From fdcc9fdb45f15719b35cfcf6b66951ae15bc4c41 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Wed, 18 Nov 2026 10:00:40 -0300
Subject: tdehtml: use nullptr for pointer constants
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 kjs/array_object.cpp                           |  16 +-
 kjs/bool_object.cpp                            |   2 +-
 kjs/collector.cpp                              |  14 +-
 kjs/context.h                                  |   2 +-
 kjs/date_object.cpp                            |  12 +-
 kjs/debugger.cpp                               |   4 +-
 kjs/dtoa.cpp                                   |  24 +--
 kjs/error_object.cpp                           |   6 +-
 kjs/function.cpp                               |  16 +-
 kjs/function_object.cpp                        |   2 +-
 kjs/grammar.y                                  |  28 +--
 kjs/identifier.cpp                             |   4 +-
 kjs/internal.cpp                               |  64 +++----
 kjs/internal.h                                 |   8 +-
 kjs/lexer.cpp                                  |  16 +-
 kjs/list.cpp                                   |   4 +-
 kjs/lookup.cpp                                 |   6 +-
 kjs/lookup.h                                   |   2 +-
 kjs/math_object.cpp                            |   4 +-
 kjs/nodes.cpp                                  |  32 ++--
 kjs/nodes.h                                    |  38 ++--
 kjs/number_object.cpp                          |   8 +-
 kjs/object.cpp                                 |  16 +-
 kjs/object.h                                   |   2 +-
 kjs/property_map.cpp                           |  34 ++--
 kjs/property_map.h                             |   2 +-
 kjs/reference_list.cpp                         |  16 +-
 kjs/regexp.cpp                                 |  18 +-
 kjs/regexp.h                                   |   2 +-
 kjs/regexp_object.cpp                          |  16 +-
 kjs/scope_chain.h                              |   4 +-
 kjs/string_object.cpp                          |  12 +-
 kjs/ustring.cpp                                |  14 +-
 kjs/ustring.h                                  |  10 +-
 kjs/value.cpp                                  |  10 +-
 kjs/value.h                                    |   6 +-
 tdehtml/css/css_base.cpp                       |   8 +-
 tdehtml/css/css_base.h                         |  10 +-
 tdehtml/css/css_renderstyledeclarationimpl.cpp |  26 +--
 tdehtml/css/css_ruleimpl.cpp                   |  40 ++--
 tdehtml/css/css_stylesheetimpl.cpp             |  52 ++---
 tdehtml/css/css_stylesheetimpl.h               |   4 +-
 tdehtml/css/css_valueimpl.cpp                  |  28 +--
 tdehtml/css/css_valueimpl.h                    |  12 +-
 tdehtml/css/cssparser.cpp                      | 110 +++++------
 tdehtml/css/cssparser.h                        |   2 +-
 tdehtml/css/cssstyleselector.cpp               |  96 +++++-----
 tdehtml/css/parser.y                           |  68 +++----
 tdehtml/dom/css_rule.cpp                       |  26 +--
 tdehtml/dom/css_stylesheet.cpp                 |  30 +--
 tdehtml/dom/css_value.cpp                      |  40 ++--
 tdehtml/dom/dom2_events.cpp                    |  12 +-
 tdehtml/dom/dom2_range.cpp                     |   6 +-
 tdehtml/dom/dom2_traversal.cpp                 |  40 ++--
 tdehtml/dom/dom2_views.cpp                     |   4 +-
 tdehtml/dom/dom_doc.cpp                        |  46 ++---
 tdehtml/dom/dom_element.cpp                    |  38 ++--
 tdehtml/dom/dom_node.cpp                       |  28 +--
 tdehtml/dom/dom_node.h                         |   2 +-
 tdehtml/dom/dom_string.cpp                     |   6 +-
 tdehtml/dom/dom_string.h                       |   4 +-
 tdehtml/dom/dom_text.cpp                       |   8 +-
 tdehtml/dom/dom_xml.cpp                        |  12 +-
 tdehtml/dom/html_block.cpp                     |   2 +-
 tdehtml/dom/html_document.cpp                  |   8 +-
 tdehtml/dom/html_element.cpp                   |   4 +-
 tdehtml/dom/html_form.cpp                      |  22 +--
 tdehtml/dom/html_head.cpp                      |  10 +-
 tdehtml/dom/html_inline.cpp                    |   8 +-
 tdehtml/dom/html_misc.cpp                      |  16 +-
 tdehtml/dom/html_object.cpp                    |   2 +-
 tdehtml/dom/html_table.cpp                     |  26 +--
 tdehtml/domtreeview.h                          |   2 +-
 tdehtml/ecma/domparser.cpp                     |   2 +-
 tdehtml/ecma/kjs_binding.cpp                   |   4 +-
 tdehtml/ecma/kjs_binding.h                     |  14 +-
 tdehtml/ecma/kjs_css.cpp                       |  44 ++---
 tdehtml/ecma/kjs_debugwin.cpp                  |  22 +--
 tdehtml/ecma/kjs_debugwin.h                    |   4 +-
 tdehtml/ecma/kjs_dom.cpp                       |  42 ++---
 tdehtml/ecma/kjs_events.cpp                    |  32 ++--
 tdehtml/ecma/kjs_html.cpp                      | 134 ++++++-------
 tdehtml/ecma/kjs_mozilla.cpp                   |   2 +-
 tdehtml/ecma/kjs_navigator.cpp                 |  24 +--
 tdehtml/ecma/kjs_proxy.cpp                     |   8 +-
 tdehtml/ecma/kjs_proxy.h                       |   2 +-
 tdehtml/ecma/kjs_range.cpp                     |   4 +-
 tdehtml/ecma/kjs_traversal.cpp                 |   8 +-
 tdehtml/ecma/kjs_views.cpp                     |   2 +-
 tdehtml/ecma/kjs_window.cpp                    |  38 ++--
 tdehtml/ecma/xmlhttprequest.cpp                |  36 ++--
 tdehtml/ecma/xmlserializer.cpp                 |   2 +-
 tdehtml/html/RefPtr.h                          |   8 +-
 tdehtml/html/html_baseimpl.cpp                 |  40 ++--
 tdehtml/html/html_documentimpl.cpp             |   8 +-
 tdehtml/html/html_documentimpl.h               |   2 +-
 tdehtml/html/html_elementimpl.cpp              |   4 +-
 tdehtml/html/html_formimpl.cpp                 |  42 ++---
 tdehtml/html/html_formimpl.h                   |  22 +--
 tdehtml/html/html_headimpl.cpp                 |  20 +-
 tdehtml/html/html_headimpl.h                   |   4 +-
 tdehtml/html/html_imageimpl.cpp                |  12 +-
 tdehtml/html/html_imageimpl.h                  |   2 +-
 tdehtml/html/html_inlineimpl.cpp               |   8 +-
 tdehtml/html/html_listimpl.cpp                 |   2 +-
 tdehtml/html/html_miscimpl.cpp                 |  10 +-
 tdehtml/html/html_objectimpl.cpp               |   8 +-
 tdehtml/html/html_tableimpl.cpp                |  16 +-
 tdehtml/html/html_tableimpl.h                  |   4 +-
 tdehtml/html/htmlparser.cpp                    |  76 ++++----
 tdehtml/html/htmltokenizer.cpp                 |  30 +--
 tdehtml/html/htmltokenizer.h                   |  14 +-
 tdehtml/java/kjavaapplet.h                     |   2 +-
 tdehtml/java/kjavaappletcontext.cpp            |   2 +-
 tdehtml/java/kjavaappletserver.cpp             |  10 +-
 tdehtml/java/kjavaappletviewer.cpp             |  10 +-
 tdehtml/java/kjavaappletwidget.cpp             |   2 +-
 tdehtml/java/kjavaappletwidget.h               |   2 +-
 tdehtml/java/kjavadownloader.cpp               |  10 +-
 tdehtml/misc/arena.cpp                         |  22 +--
 tdehtml/misc/decoder.cpp                       |  16 +-
 tdehtml/misc/guess_ja.cpp                      |   2 +-
 tdehtml/misc/knsplugininstaller.cpp            |   6 +-
 tdehtml/misc/loader.cpp                        | 108 +++++------
 tdehtml/misc/loader.h                          |   4 +-
 tdehtml/misc/loader_jpeg.cpp                   |   4 +-
 tdehtml/misc/multimap.h                        |  22 +--
 tdehtml/misc/shared.h                          |  12 +-
 tdehtml/misc/stringit.cpp                      |   2 +-
 tdehtml/misc/stringit.h                        |  12 +-
 tdehtml/rendering/bidi.cpp                     |  70 +++----
 tdehtml/rendering/bidi.h                       |  10 +-
 tdehtml/rendering/break_lines.cpp              |  14 +-
 tdehtml/rendering/counter_tree.cpp             |  10 +-
 tdehtml/rendering/counter_tree.h               |   4 +-
 tdehtml/rendering/font.cpp                     |   2 +-
 tdehtml/rendering/font.h                       |   4 +-
 tdehtml/rendering/render_applet.cpp            |   2 +-
 tdehtml/rendering/render_arena.cpp             |   2 +-
 tdehtml/rendering/render_block.cpp             |  52 ++---
 tdehtml/rendering/render_block.h               |  22 +--
 tdehtml/rendering/render_body.cpp              |   2 +-
 tdehtml/rendering/render_box.cpp               |  10 +-
 tdehtml/rendering/render_box.h                 |   2 +-
 tdehtml/rendering/render_canvas.cpp            |  10 +-
 tdehtml/rendering/render_container.cpp         |  50 ++---
 tdehtml/rendering/render_container.h           |   2 +-
 tdehtml/rendering/render_flow.cpp              |  16 +-
 tdehtml/rendering/render_flow.h                |   8 +-
 tdehtml/rendering/render_form.cpp              |  28 +--
 tdehtml/rendering/render_frames.cpp            |  14 +-
 tdehtml/rendering/render_generated.cpp         |   2 +-
 tdehtml/rendering/render_image.cpp             |   8 +-
 tdehtml/rendering/render_inline.cpp            |  18 +-
 tdehtml/rendering/render_layer.cpp             |  54 +++---
 tdehtml/rendering/render_layer.h               |   2 +-
 tdehtml/rendering/render_line.cpp              |   4 +-
 tdehtml/rendering/render_line.h                |  18 +-
 tdehtml/rendering/render_list.cpp              |  14 +-
 tdehtml/rendering/render_list.h                |   2 +-
 tdehtml/rendering/render_object.cpp            |  66 +++----
 tdehtml/rendering/render_object.h              |  28 +--
 tdehtml/rendering/render_replaced.cpp          |  14 +-
 tdehtml/rendering/render_style.cpp             |  64 +++----
 tdehtml/rendering/render_style.h               |  22 +--
 tdehtml/rendering/render_table.cpp             |  66 +++----
 tdehtml/rendering/render_table.h               |   6 +-
 tdehtml/rendering/render_text.cpp              |  24 +--
 tdehtml/rendering/render_text.h                |   6 +-
 tdehtml/rendering/table_layout.cpp             |  18 +-
 tdehtml/tdehtml_caret.cpp                      |  92 ++++-----
 tdehtml/tdehtml_caret_p.h                      |  14 +-
 tdehtml/tdehtml_events.cpp                     |   4 +-
 tdehtml/tdehtml_ext.cpp                        |   8 +-
 tdehtml/tdehtml_ext.h                          |   2 +-
 tdehtml/tdehtml_factory.cpp                    |  44 ++---
 tdehtml/tdehtml_pagecache.cpp                  |   4 +-
 tdehtml/tdehtml_part.cpp                       | 252 ++++++++++++-------------
 tdehtml/tdehtml_part.h                         |  14 +-
 tdehtml/tdehtml_printsettings.h                |   2 +-
 tdehtml/tdehtml_run.cpp                        |   4 +-
 tdehtml/tdehtml_settings.cpp                   |   6 +-
 tdehtml/tdehtmlimage.cpp                       |   8 +-
 tdehtml/tdehtmlimage.h                         |   2 +-
 tdehtml/tdehtmlpart_p.h                        |  52 ++---
 tdehtml/tdehtmlview.cpp                        | 130 ++++++-------
 tdehtml/tdehtmlview.h                          |  12 +-
 tdehtml/tdemultipart/tdemultipart.cpp          |  22 +--
 tdehtml/tdemultipart/tdemultipart.h            |   2 +-
 tdehtml/test_regression.cpp                    |  10 +-
 tdehtml/test_regression_fontoverload.cpp       |   2 +-
 tdehtml/xml/dom2_eventsimpl.cpp                |  32 ++--
 tdehtml/xml/dom2_eventsimpl.h                  |  10 +-
 tdehtml/xml/dom2_rangeimpl.cpp                 |  34 ++--
 tdehtml/xml/dom2_traversalimpl.cpp             |  60 +++---
 tdehtml/xml/dom2_viewsimpl.cpp                 |   2 +-
 tdehtml/xml/dom_docimpl.cpp                    | 216 ++++++++++-----------
 tdehtml/xml/dom_docimpl.h                      |  20 +-
 tdehtml/xml/dom_elementimpl.cpp                | 106 +++++------
 tdehtml/xml/dom_elementimpl.h                  |  14 +-
 tdehtml/xml/dom_nodeimpl.cpp                   | 140 +++++++-------
 tdehtml/xml/dom_nodeimpl.h                     |  14 +-
 tdehtml/xml/dom_stringimpl.cpp                 |   2 +-
 tdehtml/xml/dom_stringimpl.h                   |   4 +-
 tdehtml/xml/dom_textimpl.cpp                   |  10 +-
 tdehtml/xml/dom_textimpl.h                     |   2 +-
 tdehtml/xml/dom_xmlimpl.cpp                    |  46 ++---
 tdehtml/xml/xml_tokenizer.cpp                  |  18 +-
 tdehtml/xml/xml_tokenizer.h                    |   2 +-
 tdemarkdown/markdown_part.cpp                  |   2 +-
 210 files changed, 2263 insertions(+), 2263 deletions(-)

diff --git a/kjs/array_object.cpp b/kjs/array_object.cpp
index a73b0cab7..76a8ffde7 100644
--- a/kjs/array_object.cpp
+++ b/kjs/array_object.cpp
@@ -42,14 +42,14 @@ using namespace KJS;
 
 const unsigned sparseArrayCutoff = 10000;
 
-const ClassInfo ArrayInstanceImp::info = {"Array", 0, 0, 0};
+const ClassInfo ArrayInstanceImp::info = {"Array", nullptr, nullptr, nullptr};
 
 ArrayInstanceImp::ArrayInstanceImp(ObjectImp *proto, unsigned initialLength)
   : ObjectImp(proto)
   , length(initialLength)
   , storageLength(initialLength < sparseArrayCutoff ? initialLength : 0)
   , capacity(storageLength)
-  , storage(capacity ? (ValueImp **)calloc(capacity, sizeof(ValueImp *)) : 0)
+  , storage(capacity ? (ValueImp **)calloc(capacity, sizeof(ValueImp *)) : nullptr)
 {
 }
 
@@ -58,7 +58,7 @@ ArrayInstanceImp::ArrayInstanceImp(ObjectImp *proto, const List &list)
   , length(list.size())
   , storageLength(length)
   , capacity(storageLength)
-  , storage(capacity ? (ValueImp **)malloc(sizeof(ValueImp *) * capacity) : 0)
+  , storage(capacity ? (ValueImp **)malloc(sizeof(ValueImp *) * capacity) : nullptr)
 {
   ListIterator it = list.begin();
   unsigned l = length;
@@ -194,7 +194,7 @@ bool ArrayInstanceImp::deleteProperty(ExecState *exec, const Identifier &propert
     if (index >= length)
       return true;
     if (index < storageLength) {
-      storage[index] = 0;
+      storage[index] = nullptr;
       return true;
     }
   }
@@ -209,7 +209,7 @@ bool ArrayInstanceImp::deletePropertyByIndex(ExecState *exec, unsigned index)
   if (index >= length)
     return true;
   if (index < storageLength) {
-    storage[index] = 0;
+    storage[index] = nullptr;
     return true;
   }
 
@@ -312,7 +312,7 @@ void ArrayInstanceImp::sort(ExecState *exec)
 
     execForCompareByStringForQSort = exec;
     qsort(storage, lengthNotIncludingUndefined, sizeof(ValueImp *), compareByStringForQSort);
-    execForCompareByStringForQSort = 0;
+    execForCompareByStringForQSort = nullptr;
 }
 
 namespace KJS {
@@ -365,7 +365,7 @@ void ArrayInstanceImp::sort(ExecState *exec, Object &compareFunction)
     CompareWithCompareFunctionArguments args(exec, compareFunction.imp());
     compareWithCompareFunctionArguments = &args;
     qsort(storage, lengthNotIncludingUndefined, sizeof(ValueImp *), compareWithCompareFunctionForQSort);
-    compareWithCompareFunctionArguments = 0;
+    compareWithCompareFunctionArguments = nullptr;
 }
 
 unsigned ArrayInstanceImp::pushUndefinedObjectsToEnd(ExecState *exec)
@@ -407,7 +407,7 @@ unsigned ArrayInstanceImp::pushUndefinedObjectsToEnd(ExecState *exec)
 
 // ------------------------------ ArrayPrototypeImp ----------------------------
 
-const ClassInfo ArrayPrototypeImp::info = {"Array", &ArrayInstanceImp::info, &arrayTable, 0};
+const ClassInfo ArrayPrototypeImp::info = {"Array", &ArrayInstanceImp::info, &arrayTable, nullptr};
 
 /* Source for array_object.lut.h
 @begin arrayTable 17
diff --git a/kjs/bool_object.cpp b/kjs/bool_object.cpp
index c6a9c51ab..4931c6cd3 100644
--- a/kjs/bool_object.cpp
+++ b/kjs/bool_object.cpp
@@ -34,7 +34,7 @@ using namespace KJS;
 
 // ------------------------------ BooleanInstanceImp ---------------------------
 
-const ClassInfo BooleanInstanceImp::info = {"Boolean", 0, 0, 0};
+const ClassInfo BooleanInstanceImp::info = {"Boolean", nullptr, nullptr, nullptr};
 
 BooleanInstanceImp::BooleanInstanceImp(ObjectImp *proto)
   : ObjectImp(proto)
diff --git a/kjs/collector.cpp b/kjs/collector.cpp
index 20b3930a4..3623a8767 100644
--- a/kjs/collector.cpp
+++ b/kjs/collector.cpp
@@ -72,14 +72,14 @@ struct CollectorHeap {
   int numAllocationsSinceLastCollect;
 };
 
-static CollectorHeap heap = {NULL, 0, 0, 0, NULL, 0, 0, 0, 0};
+static CollectorHeap heap = {nullptr, 0, 0, 0, nullptr, 0, 0, 0, 0};
 
 bool Collector::memoryFull = false;
 
 void* Collector::allocate(size_t s)
 {
   if (s == 0)
-    return 0L;
+    return nullptr;
 
   // collect if needed
   if (++heap.numAllocationsSinceLastCollect >= ALLOCATIONS_PER_COLLECTION) {
@@ -104,7 +104,7 @@ void* Collector::allocate(size_t s)
 
   // slab allocator
 
-  CollectorBlock *targetBlock = NULL;
+  CollectorBlock *targetBlock = nullptr;
 
   int i;
   for (i = heap.firstBlockWithPossibleSpace; i < heap.usedBlocks; i++) {
@@ -116,13 +116,13 @@ void* Collector::allocate(size_t s)
 
   heap.firstBlockWithPossibleSpace = i;
 
-  if (targetBlock == NULL) {
+  if (!targetBlock) {
     // didn't find one, need to allocate a new block
 
     if (heap.usedBlocks == heap.numBlocks) {
       static const size_t maxNumBlocks = ULONG_MAX / sizeof(CollectorBlock*) / GROWTH_FACTOR;
       if ((size_t)heap.numBlocks > maxNumBlocks)
-          return 0L;
+          return nullptr;
       heap.numBlocks = MAX(MIN_ARRAY_SIZE, heap.numBlocks * GROWTH_FACTOR);
       heap.blocks = (CollectorBlock **)realloc(heap.blocks, heap.numBlocks * sizeof(CollectorBlock *));
     }
@@ -137,11 +137,11 @@ void* Collector::allocate(size_t s)
   CollectorCell *newCell = targetBlock->freeList;
 
   ValueImp *imp = (ValueImp*)newCell;
-  if (imp->_vd != NULL) {
+  if (imp->_vd) {
     targetBlock->freeList = (CollectorCell*)(imp->_vd);
   } else if (targetBlock->usedCells == (CELLS_PER_BLOCK - 1)) {
     // last cell in this block
-    targetBlock->freeList = NULL;
+    targetBlock->freeList = nullptr;
   } else {
     // all next pointers are initially 0, meaning "next cell"
     targetBlock->freeList = newCell + 1;
diff --git a/kjs/context.h b/kjs/context.h
index a6ca373e1..4a23a64cd 100644
--- a/kjs/context.h
+++ b/kjs/context.h
@@ -37,7 +37,7 @@ namespace KJS  {
   public:
     // TODO: remove glob parameter. deducable from exec.
     ContextImp(Object &glob, InterpreterImp *interpreter, Object &thisV, int _sourceId, CodeType type = GlobalCode,
-               ContextImp *callingContext = 0L, FunctionImp *func = 0L, const List *args = 0);
+               ContextImp *callingContext = nullptr, FunctionImp *func = nullptr, const List *args = nullptr);
     virtual ~ContextImp();
 
     const ScopeChain &scopeChain() const { return scope; }
diff --git a/kjs/date_object.cpp b/kjs/date_object.cpp
index 97c272baf..b2084d80a 100644
--- a/kjs/date_object.cpp
+++ b/kjs/date_object.cpp
@@ -275,7 +275,7 @@ static void fillStructuresUsingDateArgs(ExecState *exec, const List &args, int m
 
 // ------------------------------ DateInstanceImp ------------------------------
 
-const ClassInfo DateInstanceImp::info = {"Date", 0, 0, 0};
+const ClassInfo DateInstanceImp::info = {"Date", nullptr, nullptr, nullptr};
 
 DateInstanceImp::DateInstanceImp(ObjectImp *proto)
   : ObjectImp(proto)
@@ -284,7 +284,7 @@ DateInstanceImp::DateInstanceImp(ObjectImp *proto)
 
 // ------------------------------ DatePrototypeImp -----------------------------
 
-const ClassInfo DatePrototypeImp::info = {"Date", &DateInstanceImp::info, &dateTable, 0};
+const ClassInfo DatePrototypeImp::info = {"Date", &DateInstanceImp::info, &dateTable, nullptr};
 
 /* Source for date_object.lut.h
    We use a negative ID to denote the "UTC" variant.
@@ -386,9 +386,9 @@ Value DateProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &args)
   UString s;
   const int bufsize=100;
   char timebuffer[bufsize];
-  CString oldlocale = setlocale(LC_TIME,NULL);
+  CString oldlocale = setlocale(LC_TIME,nullptr);
   if (!oldlocale.c_str())
-    oldlocale = setlocale(LC_ALL, NULL);
+    oldlocale = setlocale(LC_ALL, nullptr);
   Value v = thisObj.internalValue();
   double milli = v.toNumber(exec);
   // special case: time value is NaN
@@ -631,7 +631,7 @@ Object DateObjectImp::construct(ExecState *exec, const List &args)
     double utc = floor((double)timebuffer.time * 1000.0 + (double)timebuffer.millitm);
 #else
     struct timeval tv;
-    gettimeofday(&tv, 0L);
+    gettimeofday(&tv, nullptr);
     double utc = floor((double)tv.tv_sec * 1000.0 + (double)tv.tv_usec / 1000.0);
 #endif
     value = utc;
@@ -683,7 +683,7 @@ Value DateObjectImp::call(ExecState* /*exec*/, Object &/*thisObj*/, const List &
 #ifdef KJS_VERBOSE
   fprintf(stderr,"DateObjectImp::call - current time\n");
 #endif
-  time_t t = time(0L);
+  time_t t = time(nullptr);
   // FIXME: not threadsafe
   struct tm *tm = localtime(&t);
   return String(formatDate(*tm) + " " + formatTime(*tm));
diff --git a/kjs/debugger.cpp b/kjs/debugger.cpp
index 6eec02c87..4734b3b4d 100644
--- a/kjs/debugger.cpp
+++ b/kjs/debugger.cpp
@@ -35,7 +35,7 @@ namespace KJS {
   struct AttachedInterpreter
   {
   public:
-    AttachedInterpreter(Interpreter *i) : interp(i), next(0L) {}
+    AttachedInterpreter(Interpreter *i) : interp(i), next(nullptr) {}
     Interpreter *interp;
     AttachedInterpreter *next;
   };
@@ -78,7 +78,7 @@ void Debugger::attach(Interpreter *interp)
 void Debugger::detach(Interpreter *interp)
 {
   if (interp->imp()->debugger() == this)
-    interp->imp()->setDebugger(0L);
+    interp->imp()->setDebugger(nullptr);
 
   if (!rep->interps)
     return;
diff --git a/kjs/dtoa.cpp b/kjs/dtoa.cpp
index 8fc79ddf7..f8bf77102 100644
--- a/kjs/dtoa.cpp
+++ b/kjs/dtoa.cpp
@@ -821,12 +821,12 @@ pow5mult
 		ACQUIRE_DTOA_LOCK(1);
 		if (!(p5 = p5s)) {
 			p5 = p5s = i2b(625);
-			p5->next = 0;
+			p5->next = nullptr;
 			}
 		FREE_DTOA_LOCK(1);
 #else
 		p5 = p5s = i2b(625);
-		p5->next = 0;
+		p5->next = nullptr;
 #endif
 		}
 	for(;;) {
@@ -842,12 +842,12 @@ pow5mult
 			ACQUIRE_DTOA_LOCK(1);
 			if (!(p51 = p5->next)) {
 				p51 = p5->next = mult(p5,p5);
-				p51->next = 0;
+				p51->next = nullptr;
 				}
 			FREE_DTOA_LOCK(1);
 #else
 			p51 = p5->next = mult(p5,p5);
-			p51->next = 0;
+			p51->next = nullptr;
 #endif
 			}
 		p5 = p51;
@@ -1444,7 +1444,7 @@ strtod
 	U aadj2, rv, rv0;
 	Long L;
 	ULong y, z;
-	Bigint *bb = NULL, *bb1 = NULL, *bd = NULL, *bd0 = NULL, *bs = NULL, *delta = NULL;
+	Bigint *bb = nullptr, *bb1 = nullptr, *bd = nullptr, *bd0 = nullptr, *bs = nullptr, *delta = nullptr;
 #ifdef SET_INEXACT
 	int inexact, oldinexact;
 #endif
@@ -1633,7 +1633,7 @@ strtod
 #endif
 		dval(rv) = tens[k - 9] * dval(rv) + z;
 		}
-	bd0 = 0;
+	bd0 = nullptr;
 	if (nd <= DBL_DIG
 #ifndef RND_PRODQUOT
 #ifndef Honor_FLT_ROUNDS
@@ -2482,7 +2482,7 @@ freedtoa(char *s)
 	Bfree(b);
 #ifndef MULTIPLE_THREADS
 	if (s == dtoa_result)
-		dtoa_result = 0;
+		dtoa_result = nullptr;
 #endif
 	}
 
@@ -2566,7 +2566,7 @@ dtoa
 	int denorm;
 	ULong x;
 #endif
-	Bigint *b, *b1, *delta, *mlo = NULL, *mhi, *S;
+	Bigint *b, *b1, *delta, *mlo = nullptr, *mhi, *S;
 	U d, d2, eps;
 	double ds;
 	char *s, *s0;
@@ -2580,7 +2580,7 @@ dtoa
 #ifndef MULTIPLE_THREADS
 	if (dtoa_result) {
 		freedtoa(dtoa_result);
-		dtoa_result = 0;
+		dtoa_result = nullptr;
 		}
 #endif
 
@@ -2808,7 +2808,7 @@ dtoa
 		dval(eps) = ieps*dval(d) + 7.;
 		word0(eps) -= (P-1)*Exp_msk1;
 		if (ilim == 0) {
-			S = mhi = 0;
+			S = mhi = nullptr;
 			dval(d) -= 5.;
 			if (dval(d) > dval(eps))
 				goto one_digit;
@@ -2873,7 +2873,7 @@ dtoa
 		/* Yes. */
 		ds = tens[k];
 		if (ndigits < 0 && ilim <= 0) {
-			S = mhi = 0;
+			S = mhi = nullptr;
 			if (ilim < 0 || dval(d) <= 5*ds)
 				goto no_digits;
 			goto one_digit;
@@ -2922,7 +2922,7 @@ dtoa
 
 	m2 = b2;
 	m5 = b5;
-	mhi = mlo = 0;
+	mhi = mlo = nullptr;
 	if (leftright) {
 		i =
 #ifndef Sudden_Underflow
diff --git a/kjs/error_object.cpp b/kjs/error_object.cpp
index 8eff59db2..629b28950 100644
--- a/kjs/error_object.cpp
+++ b/kjs/error_object.cpp
@@ -31,7 +31,7 @@ using namespace KJS;
 
 // ------------------------------ ErrorInstanceImp ----------------------------
 
-const ClassInfo ErrorInstanceImp::info = {"Error", 0, 0, 0};
+const ClassInfo ErrorInstanceImp::info = {"Error", nullptr, nullptr, nullptr};
 
 ErrorInstanceImp::ErrorInstanceImp(ObjectImp *proto)
   : ObjectImp(proto)
@@ -146,11 +146,11 @@ NativeErrorPrototypeImp::NativeErrorPrototypeImp(ExecState * /*exec*/, ErrorProt
 
 // ------------------------------ NativeErrorImp -------------------------------
 
-const ClassInfo NativeErrorImp::info = {"Function", &InternalFunctionImp::info, 0, 0};
+const ClassInfo NativeErrorImp::info = {"Function", &InternalFunctionImp::info, nullptr, nullptr};
 
 NativeErrorImp::NativeErrorImp(ExecState * /*exec*/, FunctionPrototypeImp *funcProto,
                                const Object &prot)
-  : InternalFunctionImp(funcProto), proto(0)
+  : InternalFunctionImp(funcProto), proto(nullptr)
 {
   Value protect(this);
   proto = static_cast<ObjectImp*>(prot.imp());
diff --git a/kjs/function.cpp b/kjs/function.cpp
index 92743b4f9..5b357726d 100644
--- a/kjs/function.cpp
+++ b/kjs/function.cpp
@@ -313,12 +313,12 @@ static UString uriUnescaped = uriAlpha+DecimalDigit+uriMark;
 
 // ----------------------------- FunctionImp ----------------------------------
 
-const ClassInfo FunctionImp::info = {"Function", &InternalFunctionImp::info, 0, 0};
+const ClassInfo FunctionImp::info = {"Function", &InternalFunctionImp::info, nullptr, nullptr};
 
 namespace KJS {
   class Parameter {
   public:
-    Parameter(const Identifier &n) : name(n), next(0L) { }
+    Parameter(const Identifier &n) : name(n), next(nullptr) { }
     ~Parameter() { delete next; }
     Identifier name;
     Parameter *next;
@@ -328,7 +328,7 @@ namespace KJS {
 FunctionImp::FunctionImp(ExecState *exec, const Identifier &n)
   : InternalFunctionImp(
       static_cast<FunctionPrototypeImp*>(exec->lexicalInterpreter()->builtinFunctionPrototype().imp())
-      ), param(0L), line0(-1), line1(-1), sid(-1)
+      ), param(nullptr), line0(-1), line1(-1), sid(-1)
 {
   //fprintf(stderr,"FunctionImp::FunctionImp this=%p\n");
   ident = n;
@@ -562,7 +562,7 @@ bool FunctionImp::deleteProperty(ExecState *exec, const Identifier &propertyName
 // ------------------------------ DeclaredFunctionImp --------------------------
 
 // ### is "Function" correct here?
-const ClassInfo DeclaredFunctionImp::info = {"Function", &FunctionImp::info, 0, 0};
+const ClassInfo DeclaredFunctionImp::info = {"Function", &FunctionImp::info, nullptr, nullptr};
 
 DeclaredFunctionImp::DeclaredFunctionImp(ExecState *exec, const Identifier &n,
 					 FunctionBodyNode *b, const ScopeChain &sc)
@@ -639,7 +639,7 @@ public:
   Identifier prop;
 };
 
-/*KDE_NOEXPORT*/ const ClassInfo ShadowImp::info = {"Shadow", 0, 0, 0};
+/*KDE_NOEXPORT*/ const ClassInfo ShadowImp::info = {"Shadow", nullptr, nullptr, nullptr};
 
 void ShadowImp::mark()
 {
@@ -652,7 +652,7 @@ void ShadowImp::mark()
 
 // ------------------------------ ArgumentsImp ---------------------------------
 
-const ClassInfo ArgumentsImp::info = {"Arguments", 0, 0, 0};
+const ClassInfo ArgumentsImp::info = {"Arguments", nullptr, nullptr, nullptr};
 
 // ECMA 10.1.8
 ArgumentsImp::ArgumentsImp(ExecState *exec, FunctionImp *func, const List &args,
@@ -714,11 +714,11 @@ void ArgumentsImp::put(ExecState *exec, const Identifier &propertyName,
 
 // ------------------------------ ActivationImp --------------------------------
 
-const ClassInfo ActivationImp::info = {"Activation", 0, 0, 0};
+const ClassInfo ActivationImp::info = {"Activation", nullptr, nullptr, nullptr};
 
 // ECMA 10.1.6
 ActivationImp::ActivationImp(FunctionImp *function, const List &arguments)
-    : _function(function), _arguments(true), _argumentsObject(0)
+    : _function(function), _arguments(true), _argumentsObject(nullptr)
 {
   _arguments = arguments.copy();
   // FIXME: Do we need to support enumerating the arguments property?
diff --git a/kjs/function_object.cpp b/kjs/function_object.cpp
index a5f2151aa..a120857e4 100644
--- a/kjs/function_object.cpp
+++ b/kjs/function_object.cpp
@@ -37,7 +37,7 @@ using namespace KJS;
 // ------------------------------ FunctionPrototypeImp -------------------------
 
 FunctionPrototypeImp::FunctionPrototypeImp(ExecState *exec)
-  : InternalFunctionImp((FunctionPrototypeImp*)0)
+  : InternalFunctionImp(static_cast<FunctionPrototypeImp *>(nullptr))
 {
   Value protect(this);
   putDirect(toStringPropertyName,
diff --git a/kjs/grammar.y b/kjs/grammar.y
index 98294639d..e2781e3e6 100644
--- a/kjs/grammar.y
+++ b/kjs/grammar.y
@@ -404,7 +404,7 @@ Statement:
 ;
 
 Block:
-    '{' '}'                        { $$ = new BlockNode(0); DBG($$, @2, @2); }
+    '{' '}'                        { $$ = new BlockNode(nullptr); DBG($$, @2, @2); }
   | '{' SourceElements '}'          { $$ = new BlockNode($2); DBG($$, @3, @3); }
 ;
 
@@ -432,7 +432,7 @@ VariableDeclarationList:
 ;
 
 VariableDeclaration:
-    IDENT                          { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Variable); }
+    IDENT                          { $$ = new VarDeclNode(*$1, nullptr, VarDeclNode::Variable); }
   | IDENT Initializer              { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Variable); }
 ;
 
@@ -455,7 +455,7 @@ ConstDeclarationList:
 ;
 
 ConstDeclaration:
-    IDENT                          { $$ = new VarDeclNode(*$1, 0, VarDeclNode::Constant); }
+    IDENT                          { $$ = new VarDeclNode(*$1, nullptr, VarDeclNode::Constant); }
   | IDENT Initializer              { $$ = new VarDeclNode(*$1, $2, VarDeclNode::Constant); }
 ;
 
@@ -478,7 +478,7 @@ ExprStatement:
 ;
 
 IfStatement: /* shift/reduce conflict due to dangling else */
-    IF '(' Expr ')' Statement      { $$ = new IfNode($3,$5,0);DBG($$,@1,@4); }
+    IF '(' Expr ')' Statement      { $$ = new IfNode($3,$5,nullptr);DBG($$,@1,@4); }
   | IF '(' Expr ')' Statement ELSE Statement
                                    { $$ = new IfNode($3,$5,$7);DBG($$,@1,@4); }
 ;
@@ -496,7 +496,7 @@ IterationStatement:
             Statement              { $$ = new ForInNode($3, $5, $7);
 	                             DBG($$,@1,@6); }
   | FOR '(' VAR IDENT IN Expr ')'
-            Statement              { $$ = new ForInNode(*$4,0,$6,$8);
+            Statement              { $$ = new ForInNode(*$4,nullptr,$6,$8);
 	                             DBG($$,@1,@7); }
   | FOR '(' VAR IDENT Initializer IN Expr ')'
             Statement              { $$ = new ForInNode(*$4,$5,$7,$9);
@@ -504,7 +504,7 @@ IterationStatement:
 ;
 
 ExprOpt:
-    /* nothing */                  { $$ = 0; }
+    /* nothing */                  { $$ = nullptr; }
   | Expr
 ;
 
@@ -536,9 +536,9 @@ BreakStatement:
 ;
 
 ReturnStatement:
-    RETURN ';'                     { $$ = new ReturnNode(0); DBG($$,@1,@2); }
+    RETURN ';'                     { $$ = new ReturnNode(nullptr); DBG($$,@1,@2); }
   | RETURN error                   { if (automatic()) {
-                                       $$ = new ReturnNode(0); DBG($$,@1,@1);
+                                       $$ = new ReturnNode(nullptr); DBG($$,@1,@1);
                                      } else
 				       YYABORT; }
   | RETURN Expr ';'                { $$ = new ReturnNode($2); DBG($$,@1,@3); }
@@ -560,13 +560,13 @@ SwitchStatement:
 ;
 
 CaseBlock:
-    '{' CaseClausesOpt '}'         { $$ = new CaseBlockNode($2, 0, 0); }
+    '{' CaseClausesOpt '}'         { $$ = new CaseBlockNode($2, nullptr, nullptr); }
   | '{' CaseClausesOpt DefaultClause CaseClausesOpt '}'
                                    { $$ = new CaseBlockNode($2, $3, $4); }
 ;
 
 CaseClausesOpt:
-    /* nothing */                  { $$ = 0; }
+    /* nothing */                  { $$ = nullptr; }
   | CaseClauses
 ;
 
@@ -581,8 +581,8 @@ CaseClause:
 ;
 
 DefaultClause:
-    DEFAULT ':'                    { $$ = new CaseClauseNode(0); }
-  | DEFAULT ':' StatementList      { $$ = new CaseClauseNode(0, $3); }
+    DEFAULT ':'                    { $$ = new CaseClauseNode(nullptr); }
+  | DEFAULT ':' StatementList      { $$ = new CaseClauseNode(nullptr, $3); }
 ;
 
 LabelledStatement:
@@ -652,14 +652,14 @@ FormalParameterList:
 ;
 
 FunctionBody:
-    '{' '}'  /* TODO: spec ??? */  { $$ = new FunctionBodyNode(0);
+    '{' '}'  /* TODO: spec ??? */  { $$ = new FunctionBodyNode(nullptr);
 	                             DBG($$, @1, @2);}
   | '{' SourceElements '}'         { $$ = new FunctionBodyNode($2);
 	                             DBG($$, @1, @3);}
 ;
 
 Program:
-    /* nothing, empty script */      { $$ = new FunctionBodyNode(0);
+    /* nothing, empty script */      { $$ = new FunctionBodyNode(nullptr);
                                      $$->setLoc(0, 0, Parser::source);
                                      Parser::progNode = $$; }
     | SourceElements                 { $$ = new FunctionBodyNode($1);
diff --git a/kjs/identifier.cpp b/kjs/identifier.cpp
index 835ab1208..00598270b 100644
--- a/kjs/identifier.cpp
+++ b/kjs/identifier.cpp
@@ -254,7 +254,7 @@ void Identifier::remove(UString::Rep *r)
     if (!key)
         return;
 
-    _table[i] = 0;
+    _table[i] = nullptr;
     --_keyCount;
 
     if (_keyCount * 6 < _tableSize && _tableSize > _minTableSize) {
@@ -268,7 +268,7 @@ void Identifier::remove(UString::Rep *r)
         key = _table[i];
         if (!key)
             break;
-        _table[i] = 0;
+        _table[i] = nullptr;
         insert(key);
     }
 }
diff --git a/kjs/internal.cpp b/kjs/internal.cpp
index c154bcd7f..29f776ae6 100644
--- a/kjs/internal.cpp
+++ b/kjs/internal.cpp
@@ -107,7 +107,7 @@ static inline void unlockInterpreter()
 
 // ------------------------------ UndefinedImp ---------------------------------
 
-UndefinedImp *UndefinedImp::staticUndefined = 0;
+UndefinedImp *UndefinedImp::staticUndefined = nullptr;
 
 Value UndefinedImp::toPrimitive(ExecState* /*exec*/, Type) const
 {
@@ -138,7 +138,7 @@ Object UndefinedImp::toObject(ExecState *exec) const
 
 // ------------------------------ NullImp --------------------------------------
 
-NullImp *NullImp::staticNull = 0;
+NullImp *NullImp::staticNull = nullptr;
 
 Value NullImp::toPrimitive(ExecState* /*exec*/, Type) const
 {
@@ -169,8 +169,8 @@ Object NullImp::toObject(ExecState *exec) const
 
 // ------------------------------ BooleanImp -----------------------------------
 
-BooleanImp* BooleanImp::staticTrue = 0;
-BooleanImp* BooleanImp::staticFalse = 0;
+BooleanImp* BooleanImp::staticTrue = nullptr;
+BooleanImp* BooleanImp::staticFalse = nullptr;
 
 Value BooleanImp::toPrimitive(ExecState* /*exec*/, Type) const
 {
@@ -293,19 +293,19 @@ double SimpleNumber::negZero = -0.0;
 
 LabelStack::LabelStack(const LabelStack &other)
 {
-  tos = 0;
+  tos = nullptr;
   *this = other;
 }
 
 LabelStack &LabelStack::operator=(const LabelStack &other)
 {
   clear();
-  tos = 0;
-  StackElem *cur = 0;
+  tos = nullptr;
+  StackElem *cur = nullptr;
   StackElem *se = other.tos;
   while (se) {
     StackElem *newPrev = new StackElem;
-    newPrev->prev = 0;
+    newPrev->prev = nullptr;
     newPrev->id = se->id;
     if (cur)
       cur->prev = newPrev;
@@ -463,9 +463,9 @@ void SourceCode::cleanup()
 
 // ------------------------------ Parser ---------------------------------------
 
-FunctionBodyNode *Parser::progNode = 0;
+FunctionBodyNode *Parser::progNode = nullptr;
 int Parser::sid = 0;
-SourceCode *Parser::source = 0;
+SourceCode *Parser::source = nullptr;
 
 FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCode **src,
 				int *errLine, UString *errMsg)
@@ -473,10 +473,10 @@ FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCo
   if (errLine)
     *errLine = -1;
   if (errMsg)
-    *errMsg = 0;
+    *errMsg = nullptr;
 
   Lexer::curr()->setCode(code, length);
-  progNode = 0;
+  progNode = nullptr;
   sid++;
 
   source = new SourceCode(sid);
@@ -491,9 +491,9 @@ FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCo
     parseError = 1;
   Lexer::curr()->doneParsing();
   FunctionBodyNode *prog = progNode;
-  progNode = 0;
+  progNode = nullptr;
   //sid = -1;
-  source = 0;
+  source = nullptr;
 
   if (parseError) {
     int eline = Lexer::curr()->lineNo();
@@ -508,7 +508,7 @@ FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCo
     fprintf( stderr, "[kjs-internal] KJS: JavaScript parse error at line %d.\n", eline);
 #endif
     delete prog;
-    return 0;
+    return nullptr;
   }
 #ifdef KJS_VERBOSE
   fprintf( stderr, "[kjs-internal] %s\n", prog->toCode().ascii() );
@@ -519,7 +519,7 @@ FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCo
 
 // ------------------------------ InterpreterImp -------------------------------
 
-InterpreterImp* InterpreterImp::s_hook = 0L;
+InterpreterImp* InterpreterImp::s_hook = nullptr;
 
 void InterpreterImp::globalInit()
 {
@@ -541,29 +541,29 @@ void InterpreterImp::globalClear()
   //fprintf( stderr, "[kjs-internal] InterpreterImp::globalClear()\n" );
   UndefinedImp::staticUndefined->deref();
   UndefinedImp::staticUndefined->setGcAllowed();
-  UndefinedImp::staticUndefined = 0L;
+  UndefinedImp::staticUndefined = nullptr;
   NullImp::staticNull->deref();
   NullImp::staticNull->setGcAllowed();
-  NullImp::staticNull = 0L;
+  NullImp::staticNull = nullptr;
   BooleanImp::staticTrue->deref();
   BooleanImp::staticTrue->setGcAllowed();
-  BooleanImp::staticTrue = 0L;
+  BooleanImp::staticTrue = nullptr;
   BooleanImp::staticFalse->deref();
   BooleanImp::staticFalse->setGcAllowed();
-  BooleanImp::staticFalse = 0L;
+  BooleanImp::staticFalse = nullptr;
   NumberImp::staticNaN->deref();
   NumberImp::staticNaN->setGcAllowed();
-  NumberImp::staticNaN = 0;
+  NumberImp::staticNaN = nullptr;
 }
 
 InterpreterImp::InterpreterImp(Interpreter *interp, const Object &glob)
   : m_interpreter(interp),
     global(glob),
-    dbg(0),
+    dbg(nullptr),
     m_compatMode(Interpreter::NativeMode),
-    _context(0),
+    _context(nullptr),
     recursion(0),
-    sources(0)
+    sources(nullptr)
 {
   // add this interpreter to the global chain
   // as a root set for garbage collection
@@ -580,7 +580,7 @@ InterpreterImp::InterpreterImp(Interpreter *interp, const Object &glob)
   }
   unlockInterpreter();
 
-  globExec = new ExecState(m_interpreter,0);
+  globExec = new ExecState(m_interpreter,nullptr);
 
   // initialize properties of the global object
   initGlobalObject();
@@ -743,9 +743,9 @@ InterpreterImp::~InterpreterImp()
   if (dbg)
     dbg->detach(m_interpreter);
   for (SourceCode *s = sources; s; s = s->next)
-    s->interpreter = 0;
+    s->interpreter = nullptr;
   delete globExec;
-  globExec = 0L;
+  globExec = nullptr;
   clear();
 }
 
@@ -760,7 +760,7 @@ void InterpreterImp::clear()
   if (s_hook == this)
   {
     // This was the last interpreter
-    s_hook = 0L;
+    s_hook = nullptr;
     globalClear();
   }
   unlockInterpreter();
@@ -797,7 +797,7 @@ bool InterpreterImp::checkSyntax(const UString &code, int *errLine, UString *err
   SourceCode *source;
   FunctionBodyNode *progNode = Parser::parse(code.data(),code.size(),&source,errLine,errMsg);
   source->deref();
-  bool ok = (progNode != 0);
+  bool ok = (progNode != nullptr);
   delete progNode;
   return ok;
 }
@@ -806,9 +806,9 @@ bool InterpreterImp::checkSyntax(const UString &code)
 {
   // Parser::parse() returns 0 in a syntax error occurs, so we just check for that
   SourceCode *source;
-  FunctionBodyNode *progNode = Parser::parse(code.data(),code.size(),&source,0,0);
+  FunctionBodyNode *progNode = Parser::parse(code.data(),code.size(),&source,nullptr,nullptr);
   source->deref();
-  bool ok = (progNode != 0);
+  bool ok = (progNode != nullptr);
   delete progNode;
   return ok;
 }
@@ -966,7 +966,7 @@ void InterpreterImp::removeSourceCode(SourceCode *code)
 
 // ------------------------------ InternalFunctionImp --------------------------
 
-const ClassInfo InternalFunctionImp::info = {"Function", 0, 0, 0};
+const ClassInfo InternalFunctionImp::info = {"Function", nullptr, nullptr, nullptr};
 
 InternalFunctionImp::InternalFunctionImp(FunctionPrototypeImp *funcProto)
   : ObjectImp(funcProto)
diff --git a/kjs/internal.h b/kjs/internal.h
index cfba61e5b..d19bdb449 100644
--- a/kjs/internal.h
+++ b/kjs/internal.h
@@ -160,7 +160,7 @@ namespace KJS {
    */
   class LabelStack {
   public:
-    LabelStack(): tos(0L), iterationDepth(0), switchDepth(0) {}
+    LabelStack(): tos(nullptr), iterationDepth(0), switchDepth(0) {}
     ~LabelStack();
 
     LabelStack(const LabelStack &other);
@@ -208,7 +208,7 @@ namespace KJS {
   class SourceCode {
   public:
     SourceCode(int _sid)
-      : sid(_sid), interpreter(0), refcount(0), next(0) {}
+      : sid(_sid), interpreter(nullptr), refcount(0), next(nullptr) {}
 
     void ref() { refcount++; }
     void deref() { if (!--refcount) cleanup(); }
@@ -230,7 +230,7 @@ namespace KJS {
   class Parser {
   public:
     static FunctionBodyNode *parse(const UChar *code, unsigned int length, SourceCode **src,
-				   int *errLine = 0, UString *errMsg = 0);
+				   int *errLine = nullptr, UString *errMsg = nullptr);
 
     static FunctionBodyNode *progNode;
     static SourceCode *source;
@@ -372,7 +372,7 @@ namespace KJS {
   public:
 
     DebuggerImp() {
-      interps = 0;
+      interps = nullptr;
       isAborted = false;
     }
 
diff --git a/kjs/lexer.cpp b/kjs/lexer.cpp
index 9c304dd8b..96e5e5e0f 100644
--- a/kjs/lexer.cpp
+++ b/kjs/lexer.cpp
@@ -43,7 +43,7 @@
 // we can't specify the namespace in yacc's C output, so do it here
 using namespace KJS;
 
-static Lexer *currLexer = 0;
+static Lexer *currLexer = nullptr;
 
 #ifndef KDE_USE_FINAL
 #include "grammar.h"
@@ -63,13 +63,13 @@ Lexer::Lexer()
   : yylineno(1),
     size8(128), size16(128), restrKeyword(false),
     convertNextIdentifier(false), stackToken(-1), lastToken(-1), pos(0),
-    code(0), length(0),
+    code(nullptr), length(0),
 #ifndef KJS_PURE_ECMA
     bol(true),
 #endif
     current(0), next1(0), next2(0), next3(0),
-    strings(0), numStrings(0), stringsCapacity(0),
-    identifiers(0), numIdentifiers(0), identifiersCapacity(0)
+    strings(nullptr), numStrings(0), stringsCapacity(0),
+    identifiers(nullptr), numIdentifiers(0), identifiersCapacity(0)
 {
   // allocate space for read buffers
   buffer8 = new char[size8];
@@ -96,7 +96,7 @@ Lexer *Lexer::curr()
 void Lexer::globalClear()
 {
   delete currLexer;
-  currLexer = 0L;
+  currLexer = nullptr;
 }
 #endif
 
@@ -472,7 +472,7 @@ int Lexer::lex()
 
   long double dval = 0;
   if (state == Number) {
-    dval = kjs_strtod(buffer8, 0L);
+    dval = kjs_strtod(buffer8, nullptr);
   } else if (state == Hex) { // scan hex numbers
     dval = 0;
     if (buffer8[0] == '0' && (buffer8[1] == 'x' || buffer8[1] == 'X')) {
@@ -888,7 +888,7 @@ void Lexer::doneParsing()
     delete identifiers[i];
   }
   free(identifiers);
-  identifiers = 0;
+  identifiers = nullptr;
   numIdentifiers = 0;
   identifiersCapacity = 0;
 
@@ -896,7 +896,7 @@ void Lexer::doneParsing()
     delete strings[i];
   }
   free(strings);
-  strings = 0;
+  strings = nullptr;
   numStrings = 0;
   stringsCapacity = 0;
 }
diff --git a/kjs/list.cpp b/kjs/list.cpp
index 7c674573b..3fdbf8b10 100644
--- a/kjs/list.cpp
+++ b/kjs/list.cpp
@@ -124,7 +124,7 @@ List::List() : _impBase(allocateListImp()), _needsMarking(false)
     imp->size = 0;
     imp->refCount = 1;
     imp->capacity = 0;
-    imp->overflow = 0;
+    imp->overflow = nullptr;
 
     if (!_needsMarking) {
 	imp->valueRefCount = 1;
@@ -142,7 +142,7 @@ List::List(bool needsMarking) : _impBase(allocateListImp()), _needsMarking(needs
     imp->size = 0;
     imp->refCount = 1;
     imp->capacity = 0;
-    imp->overflow = 0;
+    imp->overflow = nullptr;
 
     if (!_needsMarking) {
 	imp->valueRefCount = 1;
diff --git a/kjs/lookup.cpp b/kjs/lookup.cpp
index 7bf6bd738..70daf7a60 100644
--- a/kjs/lookup.cpp
+++ b/kjs/lookup.cpp
@@ -44,7 +44,7 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table,
 #ifndef NDEBUG
   if (table->type != 2) {
     fprintf(stderr, "KJS: Unknown hash table version.\n");
-    return 0;
+    return nullptr;
   }
 #endif
 
@@ -53,7 +53,7 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table,
 
   // empty bucket ?
   if (!e->soffset)
-    return 0;
+    return nullptr;
 
   while(1) {
     // compare strings
@@ -65,7 +65,7 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table,
     e = &table->entries[e->next];
   }
 
-  return 0;
+  return nullptr;
 }
 
 const HashEntry* Lookup::findEntry( const struct HashTable *table,
diff --git a/kjs/lookup.h b/kjs/lookup.h
index e605cbbfb..0c20c5eb5 100644
--- a/kjs/lookup.h
+++ b/kjs/lookup.h
@@ -312,7 +312,7 @@ namespace KJS {
 
 #define IMPLEMENT_CLASSINFO(ClassName,ClassProto) \
   namespace KJS {\
-  const KJS::ClassInfo ClassProto::info = { ClassName, 0, &ClassProto##Table, 0 }; \
+  const KJS::ClassInfo ClassProto::info = { ClassName, nullptr, &ClassProto##Table, nullptr }; \
   }
 
 #define DEFINE_PROTOTYPE(ClassName,ClassProto) \
diff --git a/kjs/math_object.cpp b/kjs/math_object.cpp
index 51bf9632d..68af7d546 100644
--- a/kjs/math_object.cpp
+++ b/kjs/math_object.cpp
@@ -45,7 +45,7 @@ using namespace KJS;
 
 // ------------------------------ MathObjectImp --------------------------------
 
-const ClassInfo MathObjectImp::info = { "Math", 0, &mathTable, 0 };
+const ClassInfo MathObjectImp::info = { "Math", nullptr, &mathTable, nullptr };
 
 /* Source for math_object.lut.h
 @begin mathTable 31
@@ -82,7 +82,7 @@ MathObjectImp::MathObjectImp(ExecState * /*exec*/,
                              ObjectPrototypeImp *objProto)
   : ObjectImp(objProto)
 {
-   unsigned int seed = time(NULL);
+   unsigned int seed = time(nullptr);
    ::srand(seed);
 }
 
diff --git a/kjs/nodes.cpp b/kjs/nodes.cpp
index 80d530204..11897edc3 100644
--- a/kjs/nodes.cpp
+++ b/kjs/nodes.cpp
@@ -91,7 +91,7 @@ using namespace KJS;
     return List(); // will be picked up by KJS_CHECKEXCEPTION
 
 #ifdef KJS_DEBUG_MEM
-std::list<Node *> * Node::s_nodes = 0L;
+std::list<Node *> * Node::s_nodes = nullptr;
 #endif
 
 // ----------------------------- Node -----------------------------------------
@@ -158,7 +158,7 @@ void Node::finalCheck()
   for ( uint i = 0; it != s_nodes->end() ; ++it, ++i )
     fprintf( stderr, "[nodes] [%d] Still having node %p (%s) (refcount %d)\n", i, (void*)*it, typeid( **it ).name(), (*it)->refcount );
   delete s_nodes;
-  s_nodes = 0L;
+  s_nodes = nullptr;
 }
 #endif
 
@@ -214,7 +214,7 @@ void Node::setExceptionDetailsIfNeeded(ExecState *exec) const
 }
 
 // ----------------------------- StatementNode --------------------------------
-StatementNode::StatementNode() : l0(-1), l1(-1), sourceCode(0), breakPoint(false)
+StatementNode::StatementNode() : l0(-1), l1(-1), sourceCode(nullptr), breakPoint(false)
 {
 }
 
@@ -970,7 +970,7 @@ bool TypeOfNode::deref()
 // ECMA 11.4.3
 Value TypeOfNode::evaluate(ExecState *exec) const
 {
-  const char *s = 0L;
+  const char *s = nullptr;
   Reference ref = expr->evaluateReference(exec);
   KJS_CHECKEXCEPTIONVALUE
   if (ref.isMutable()) {
@@ -1199,15 +1199,15 @@ Node* AddNode::create(Node *t1, Node *t2, char op)
   // fold constants
   if ((t1->type() == NumberType || t1->type() == BooleanType) &&
       (t2->type() == NumberType || t2->type() == BooleanType)) {
-    double d = t2->toNumber(0);
-    Node* n = new NumberNode(t1->toNumber(0) + (op == '+' ? d : -d));
+    double d = t2->toNumber(nullptr);
+    Node* n = new NumberNode(t1->toNumber(nullptr) + (op == '+' ? d : -d));
     delete t1;
     delete t2;
     return n;
   }
 
   if (op == '+' && t2->type() == StringType)
-    return new AppendStringNode(t1, t2->toString(0));
+    return new AppendStringNode(t1, t2->toString(nullptr));
 
   // fall back to generic node
   return new AddNode(t1, t2, op);
@@ -1909,10 +1909,10 @@ BlockNode::BlockNode(SourceElementsNode *s)
 {
   if (s) {
     source = s->elements;
-    s->elements = 0;
+    s->elements = nullptr;
     setLoc(s->firstLine(), s->lastLine(), s->code());
   } else {
-    source = 0;
+    source = nullptr;
   }
 }
 
@@ -2223,7 +2223,7 @@ void ForNode::processVarDecls(ExecState *exec)
 // ----------------------------- ForInNode ------------------------------------
 
 ForInNode::ForInNode(Node *l, Node *e, StatementNode *s)
-  : init(0L), lexpr(l), expr(e), varDecl(0L), statement(s)
+  : init(nullptr), lexpr(l), expr(e), varDecl(nullptr), statement(s)
 {
 }
 
@@ -2535,15 +2535,15 @@ CaseBlockNode::CaseBlockNode(ClauseListNode *l1, CaseClauseNode *d,
   def = d;
   if (l1) {
     list1 = l1->nx;
-    l1->nx = 0;
+    l1->nx = nullptr;
   } else {
-    list1 = 0;
+    list1 = nullptr;
   }
   if (l2) {
     list2 = l2->nx;
-    l2->nx = 0;
+    l2->nx = nullptr;
   } else {
-    list2 = 0;
+    list2 = nullptr;
   }
 }
 
@@ -2980,7 +2980,7 @@ void FuncDeclNode::processFuncDecl(ExecState *exec)
   func.put(exec, prototypePropertyName, proto, Internal|DontDelete);
 
   int plen = 0;
-  for(const ParameterNode *p = param; p != 0L; p = p->nextParam(), plen++)
+  for(const ParameterNode *p = param; p; p = p->nextParam(), plen++)
     fimp->addParameter(p->ident());
 
   func.put(exec, lengthPropertyName, Number(plen), ReadOnly|DontDelete|DontEnum);
@@ -3049,7 +3049,7 @@ Value FuncExprNode::evaluate(ExecState *exec) const
   Value proto = exec->lexicalInterpreter()->builtinObject().construct(exec,empty);
   fimp->put(exec, prototypePropertyName, proto, Internal|DontDelete);
 
-  for(const ParameterNode *p = param; p != 0L; p = p->nextParam())
+  for(const ParameterNode *p = param; p; p = p->nextParam())
     fimp->addParameter(p->ident());
 
   if (named) {
diff --git a/kjs/nodes.h b/kjs/nodes.h
index bcbfd7f6d..1857f87f3 100644
--- a/kjs/nodes.h
+++ b/kjs/nodes.h
@@ -146,7 +146,7 @@ namespace KJS {
   protected:
     LabelStack ls;
   private:
-    Reference evaluateReference(ExecState* /*exec*/) const { return Reference(0,Identifier::null()); }
+    Reference evaluateReference(ExecState* /*exec*/) const { return Reference(nullptr,Identifier::null()); }
     int l0, l1;
     SourceCode *sourceCode;
     bool breakPoint;
@@ -260,11 +260,11 @@ namespace KJS {
 
   class ArrayNode : public Node {
   public:
-    ArrayNode(int e) : element(0L), elision(e), opt(true) { }
+    ArrayNode(int e) : element(nullptr), elision(e), opt(true) { }
     ArrayNode(ElementNode *ele)
-      : element(ele->list), elision(0), opt(false) { ele->list = 0; }
+      : element(ele->list), elision(0), opt(false) { ele->list = nullptr; }
     ArrayNode(int eli, ElementNode *ele)
-      : element(ele->list), elision(eli), opt(true) { ele->list = 0; }
+      : element(ele->list), elision(eli), opt(true) { ele->list = nullptr; }
     virtual void ref();
     virtual bool deref();
     virtual Value evaluate(ExecState *exec) const;
@@ -307,9 +307,9 @@ namespace KJS {
   class ObjectLiteralNode : public Node {
   public:
     // empty literal
-    ObjectLiteralNode() : list(0) { }
+    ObjectLiteralNode() : list(nullptr) { }
     // l points to last list element, get and detach pointer to first one
-    ObjectLiteralNode(PropertyValueNode *l) : list(l->list) { l->list = 0; }
+    ObjectLiteralNode(PropertyValueNode *l) : list(l->list) { l->list = nullptr; }
     virtual void ref();
     virtual bool deref();
     virtual Value evaluate(ExecState *exec) const;
@@ -361,8 +361,8 @@ namespace KJS {
 
   class ArgumentsNode : public Node {
   public:
-    ArgumentsNode() : list(0) {}
-    ArgumentsNode(ArgumentListNode *l) : list(l->list) { l->list = 0; }
+    ArgumentsNode() : list(nullptr) {}
+    ArgumentsNode(ArgumentListNode *l) : list(l->list) { l->list = nullptr; }
     virtual void ref();
     virtual bool deref();
     virtual Value evaluate(ExecState *exec) const;
@@ -374,7 +374,7 @@ namespace KJS {
 
   class NewExprNode : public Node {
   public:
-    NewExprNode(Node *e) : expr(e), args(0L) {}
+    NewExprNode(Node *e) : expr(e), args(nullptr) {}
     NewExprNode(Node *e, ArgumentsNode *a) : expr(e), args(a) {}
     virtual void ref();
     virtual bool deref();
@@ -709,7 +709,7 @@ namespace KJS {
 
   class VarStatementNode : public StatementNode {
   public:
-    VarStatementNode(VarDeclListNode *l) : list(l->list) { l->list = 0; }
+    VarStatementNode(VarDeclListNode *l) : list(l->list) { l->list = nullptr; }
     virtual void ref();
     virtual bool deref();
     virtual Completion execute(ExecState *exec);
@@ -794,7 +794,7 @@ namespace KJS {
     ForNode(Node *e1, Node *e2, Node *e3, StatementNode *s) :
       expr1(e1), expr2(e2), expr3(e3), statement(s) {}
     ForNode(VarDeclListNode *e1, Node *e2, Node *e3, StatementNode *s) :
-      expr1(e1->list), expr2(e2), expr3(e3), statement(s) { e1->list = 0; }
+      expr1(e1->list), expr2(e2), expr3(e3), statement(s) { e1->list = nullptr; }
     virtual void ref();
     virtual bool deref();
     virtual Completion execute(ExecState *exec);
@@ -868,9 +868,9 @@ namespace KJS {
 
   class CaseClauseNode : public Node {
   public:
-    CaseClauseNode(Node *e) : expr(e), list(0) { }
+    CaseClauseNode(Node *e) : expr(e), list(nullptr) { }
     CaseClauseNode(Node *e, StatListNode *l)
-      : expr(e), list(l->list) { l->list = 0; }
+      : expr(e), list(l->list) { l->list = nullptr; }
     virtual void ref();
     virtual bool deref();
     virtual Value evaluate(ExecState *exec) const;
@@ -982,9 +982,9 @@ namespace KJS {
   class TryNode : public StatementNode {
   public:
     TryNode(StatementNode *b, CatchNode *c)
-      : block(b), _catch(c), _final(0) {}
+      : block(b), _catch(c), _final(nullptr) {}
     TryNode(StatementNode *b, FinallyNode *f)
-      : block(b), _catch(0), _final(f) {}
+      : block(b), _catch(nullptr), _final(f) {}
     TryNode(StatementNode *b, CatchNode *c, FinallyNode *f)
       : block(b), _catch(c), _final(f) {}
     virtual void ref();
@@ -1027,9 +1027,9 @@ namespace KJS {
   class FuncDeclNode : public StatementNode {
   public:
     FuncDeclNode(const Identifier &i, FunctionBodyNode *b)
-      : ident(i), param(0), body(b) { }
+      : ident(i), param(nullptr), body(b) { }
     FuncDeclNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b)
-      : ident(i), param(p->next), body(b) { p->next = 0; }
+      : ident(i), param(p->next), body(b) { p->next = nullptr; }
     virtual void ref();
     virtual bool deref();
     Completion execute(ExecState* /*exec*/)
@@ -1045,9 +1045,9 @@ namespace KJS {
   class FuncExprNode : public Node {
   public:
     FuncExprNode(const Identifier &i, FunctionBodyNode *b)
-      : ident(i), param(0), body(b) { }
+      : ident(i), param(nullptr), body(b) { }
     FuncExprNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b)
-      : ident(i), param(p->next), body(b) { p->next = 0; }
+      : ident(i), param(p->next), body(b) { p->next = nullptr; }
     virtual void ref();
     virtual bool deref();
     virtual Value evaluate(ExecState *exec) const;
diff --git a/kjs/number_object.cpp b/kjs/number_object.cpp
index 4d5a95cd5..c3b72f090 100644
--- a/kjs/number_object.cpp
+++ b/kjs/number_object.cpp
@@ -37,7 +37,7 @@ using namespace KJS;
 
 // ------------------------------ NumberInstanceImp ----------------------------
 
-const ClassInfo NumberInstanceImp::info = {"Number", 0, 0, 0};
+const ClassInfo NumberInstanceImp::info = {"Number", nullptr, nullptr, nullptr};
 
 NumberInstanceImp::NumberInstanceImp(ObjectImp *proto)
   : ObjectImp(proto)
@@ -93,7 +93,7 @@ static UString integer_part_noexp(double d)
 {
   int decimalPoint;
   int signDummy;
-  char *result = kjs_dtoa(d, 0, 0, &decimalPoint, &signDummy, NULL);
+  char *result = kjs_dtoa(d, 0, 0, &decimalPoint, &signDummy, nullptr);
   int length = strlen(result);
 
   // sign for non-zero, negative numbers
@@ -292,7 +292,7 @@ Value NumberProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg
     if (isNaN(x))
       return String("NaN");
 
-    char *result = kjs_dtoa(x, 0, 0, &decimalPoint, &sign, NULL);
+    char *result = kjs_dtoa(x, 0, 0, &decimalPoint, &sign, nullptr);
     int length = strlen(result);
     decimalPoint += decimalAdjust;
 
@@ -426,7 +426,7 @@ Value NumberProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg
 
 // ------------------------------ NumberObjectImp ------------------------------
 
-const ClassInfo NumberObjectImp::info = {"Function", &InternalFunctionImp::info, &numberTable, 0};
+const ClassInfo NumberObjectImp::info = {"Function", &InternalFunctionImp::info, &numberTable, nullptr};
 
 /* Source for number_object.lut.h
 @begin numberTable 5
diff --git a/kjs/object.cpp b/kjs/object.cpp
index d56a72458..a053a690e 100644
--- a/kjs/object.cpp
+++ b/kjs/object.cpp
@@ -45,7 +45,7 @@ using namespace KJS;
 Object Object::dynamicCast(const Value &v)
 {
   if (!v.isValid() || v.type() != ObjectType)
-    return Object(0);
+    return Object(nullptr);
 
   return Object(static_cast<ObjectImp*>(v.imp()));
 }
@@ -81,13 +81,13 @@ Value Object::call(ExecState *exec, Object &thisObj, const List &args)
 // ------------------------------ ObjectImp ------------------------------------
 
 ObjectImp::ObjectImp(const Object &proto)
-  : _proto(static_cast<ObjectImp*>(proto.imp())), _internalValue(0L)
+  : _proto(static_cast<ObjectImp*>(proto.imp())), _internalValue(nullptr)
 {
   //fprintf(stderr,"ObjectImp::ObjectImp %p\n",(void*)this);
 }
 
 ObjectImp::ObjectImp(ObjectImp *proto)
-  : _proto(proto), _internalValue(0L)
+  : _proto(proto), _internalValue(nullptr)
 {
 }
 
@@ -95,7 +95,7 @@ ObjectImp::ObjectImp()
 {
   //fprintf(stderr,"ObjectImp::ObjectImp %p\n",(void*)this);
   _proto = NullImp::staticNull;
-  _internalValue = 0L;
+  _internalValue = nullptr;
 }
 
 ObjectImp::~ObjectImp()
@@ -121,7 +121,7 @@ void ObjectImp::mark()
 
 const ClassInfo *ObjectImp::classInfo() const
 {
-  return 0;
+  return nullptr;
 }
 
 bool ObjectImp::inherits(const ClassInfo *info) const
@@ -361,7 +361,7 @@ const HashEntry* ObjectImp::findPropertyHashEntry( const Identifier& propertyNam
     }
     info = info->parentClass;
   }
-  return 0L;
+  return nullptr;
 }
 
 bool ObjectImp::implementsConstruct() const
@@ -372,7 +372,7 @@ bool ObjectImp::implementsConstruct() const
 Object ObjectImp::construct(ExecState* /*exec*/, const List &/*args*/)
 {
   assert(false);
-  return Object(0);
+  return Object(nullptr);
 }
 
 bool ObjectImp::implementsCall() const
@@ -383,7 +383,7 @@ bool ObjectImp::implementsCall() const
 Value ObjectImp::call(ExecState* /*exec*/, Object &/*thisObj*/, const List &/*args*/)
 {
   assert(false);
-  return Object(0);
+  return Object(nullptr);
 }
 
 bool ObjectImp::implementsHasInstance() const
diff --git a/kjs/object.h b/kjs/object.h
index 143cdcb6d..b4d972fb8 100644
--- a/kjs/object.h
+++ b/kjs/object.h
@@ -635,7 +635,7 @@ namespace KJS {
      * @param sourceId Optional source id.
      */
     static Object create(ExecState *exec, ErrorType errtype = GeneralError,
-                         const char *message = 0, int lineno = -1,
+                         const char *message = nullptr, int lineno = -1,
                          int sourceId = -1);
 
     /**
diff --git a/kjs/property_map.cpp b/kjs/property_map.cpp
index bd9e823de..601a687c2 100644
--- a/kjs/property_map.cpp
+++ b/kjs/property_map.cpp
@@ -80,7 +80,7 @@ public:
     int attributes;
 };
 
-SavedProperties::SavedProperties() : _count(0), _properties(0) { }
+SavedProperties::SavedProperties() : _count(0), _properties(nullptr) { }
 
 SavedProperties::~SavedProperties()
 {
@@ -89,7 +89,7 @@ SavedProperties::~SavedProperties()
 
 // Algorithm concepts from Algorithms in C++, Sedgewick.
 
-PropertyMap::PropertyMap() : _table(0)
+PropertyMap::PropertyMap() : _table(nullptr)
 {
 }
 
@@ -123,7 +123,7 @@ void PropertyMap::clear()
         UString::Rep *key = _singleEntry.key;
         if (key) {
             key->deref();
-            _singleEntry.key = 0;
+            _singleEntry.key = nullptr;
         }
 #endif
         return;
@@ -133,7 +133,7 @@ void PropertyMap::clear()
         UString::Rep *key = _table->entries[i].key;
         if (key) {
             key->deref();
-            _table->entries[i].key = 0;
+            _table->entries[i].key = nullptr;
         }
     }
     _table->keyCount = 0;
@@ -158,7 +158,7 @@ ValueImp *PropertyMap::get(const Identifier &name, int &attributes) const
             return _singleEntry.value;
         }
 #endif
-        return 0;
+        return nullptr;
     }
 
     int i = hash(rep);
@@ -173,7 +173,7 @@ ValueImp *PropertyMap::get(const Identifier &name, int &attributes) const
         }
         i = (i + 1) & _table->sizeMask;
     }
-    return 0;
+    return nullptr;
 }
 
 ValueImp *PropertyMap::get(const Identifier &name) const
@@ -188,7 +188,7 @@ ValueImp *PropertyMap::get(const Identifier &name) const
         if (rep == key)
             return _singleEntry.value;
 #endif
-        return 0;
+        return nullptr;
     }
 
     int i = hash(rep);
@@ -201,7 +201,7 @@ ValueImp *PropertyMap::get(const Identifier &name) const
             return _table->entries[i].value;
         i = (i + 1) & _table->sizeMask;
     }
-    return 0;
+    return nullptr;
 }
 
 #if DEBUG_PROPERTIES
@@ -225,7 +225,7 @@ static void printAttributes(int attributes)
 void PropertyMap::put(const Identifier &name, ValueImp *value, int attributes)
 {
     assert(!name.isNull());
-    assert(value != 0);
+    assert(value);
 
 #if DO_CONSISTENCY_CHECK // speed, why call a stub if we dont need to??
     checkConsistency();
@@ -342,7 +342,7 @@ void PropertyMap::expand()
     if (key) {
         insert(key, _singleEntry.value, _singleEntry.attributes);
         _table->keyCount++;
-        _singleEntry.key = 0;
+        _singleEntry.key = nullptr;
 
         // store sort order
         // first get the id of newly inserted key, check for trashed hash, then store it
@@ -410,7 +410,7 @@ void PropertyMap::remove(const Identifier &name)
         key = _singleEntry.key;
         if (rep == key) {
             key->deref();
-            _singleEntry.key = 0;
+            _singleEntry.key = nullptr;
             checkConsistency();
         }
 #endif
@@ -434,7 +434,7 @@ void PropertyMap::remove(const Identifier &name)
 
     // Remove the one key.
     key->deref();
-    _table->entries[i].key = 0;
+    _table->entries[i].key = nullptr;
     assert(_table->keyCount >= 1);
     --_table->keyCount;
 
@@ -445,7 +445,7 @@ void PropertyMap::remove(const Identifier &name)
         if (!key)
             break;
 
-        _table->entries[i].key = 0;
+        _table->entries[i].key = nullptr;
 
         insert(key, _table->entries[i].value, _table->entries[i].attributes);
 
@@ -508,7 +508,7 @@ void PropertyMap::addEnumerablesToReferenceList(ReferenceList &list, const Objec
     UString::Rep **allKeys = new UString::Rep*[indexSize];
 
     for (int i = 0; i < indexSize; i++)
-        allKeys[i] = NULL;
+        allKeys[i] = nullptr;
 
     // push  valid hashes to the array allKeys, using insert order as index.
     // we need to pass array hashes instead of pointers to keys, because we got
@@ -528,10 +528,10 @@ void PropertyMap::addEnumerablesToReferenceList(ReferenceList &list, const Objec
     }
     // Put the keys of the sorted entries into the reference list.
     for (int i = 0; i < indexSize; ++i) {
-        if (allKeys[i] != NULL){
+        if (allKeys[i]){
             list.append(Reference(base, Identifier(allKeys[i])));
         }
-        allKeys[i] = NULL; // dont deallocate key by accident, when we delete allKeys
+        allKeys[i] = nullptr; // dont deallocate key by accident, when we delete allKeys
     }
 
     // Deallocate the buffer.
@@ -588,7 +588,7 @@ void PropertyMap::save(SavedProperties &p) const
     p._count = count;
 
     if (count == 0) {
-        p._properties = 0;
+        p._properties = nullptr;
         return;
     }
 
diff --git a/kjs/property_map.h b/kjs/property_map.h
index 8b0819fa5..06dd7b697 100644
--- a/kjs/property_map.h
+++ b/kjs/property_map.h
@@ -56,7 +56,7 @@ namespace KJS {
 */
     struct PropertyMapHashTableEntry
     {
-        PropertyMapHashTableEntry() : key(0) { }
+        PropertyMapHashTableEntry() : key(nullptr) { }
         UString::Rep *key;
         ValueImp *value;
         int attributes;
diff --git a/kjs/reference_list.cpp b/kjs/reference_list.cpp
index b85d93b77..a0e7a77f3 100644
--- a/kjs/reference_list.cpp
+++ b/kjs/reference_list.cpp
@@ -27,7 +27,7 @@ namespace KJS {
     friend class ReferenceListIterator;
 
   protected:
-    ReferenceListNode(const Reference &ref) : reference(ref), next(NULL) {}
+    ReferenceListNode(const Reference &ref) : reference(ref), next(nullptr) {}
 
   private:
     Reference reference;
@@ -50,8 +50,8 @@ using namespace KJS;
 // ReferenceList
 
 ReferenceList::ReferenceList() :
-  head(NULL),
-  tail(NULL)
+  head(nullptr),
+  tail(nullptr)
 {
 }
 
@@ -59,7 +59,7 @@ ReferenceList::ReferenceList(const ReferenceList &list)
 {
   head = list.head;
   tail = list.tail;
-  if (head != NULL) {
+  if (head) {
     head->refcount++;
   }
 }
@@ -86,7 +86,7 @@ void ReferenceList::swap(ReferenceList &list)
 
 void ReferenceList::append(const Reference& ref)
 {
-  if (tail == NULL) {
+  if (!tail) {
     tail = head = new ReferenceListHeadNode(ref);
   } else {
     tail->next = new ReferenceListNode(ref);
@@ -102,10 +102,10 @@ int ReferenceList::length()
 
 ReferenceList::~ReferenceList()
 {
-  if (head != NULL && --(head->refcount) == 0) {
+  if (head && --(head->refcount) == 0) {
     ReferenceListNode *next;
 
-    for (ReferenceListNode *p = head; p != NULL; p = next) {
+    for (ReferenceListNode *p = head; p; p = next) {
       next = p->next;
       if (p == head) {
 	delete (ReferenceListHeadNode *)p;
@@ -123,7 +123,7 @@ ReferenceListIterator ReferenceList::begin() const
 
 ReferenceListIterator ReferenceList::end() const
 {
-  return ReferenceListIterator(NULL);
+  return ReferenceListIterator(nullptr);
 }
 
 
diff --git a/kjs/regexp.cpp b/kjs/regexp.cpp
index 04159904f..8b37d5b36 100644
--- a/kjs/regexp.cpp
+++ b/kjs/regexp.cpp
@@ -35,7 +35,7 @@ RegExp::UTF8SupportState RegExp::utf8Support = RegExp::Unknown;
 #endif
 
 RegExp::RegExp(const UString &p, int f)
-  : pat(p), flgs(f), m_notEmpty(false), valid(true), buffer(0), originalPos(0)
+  : pat(p), flgs(f), m_notEmpty(false), valid(true), buffer(nullptr), originalPos(nullptr)
 {
 #ifdef HAVE_PCRE2POSIX
   // Determine whether libpcre has unicode support if need be..
@@ -145,7 +145,7 @@ RegExp::RegExp(const UString &p, int f)
   prepareMatch(intern);
 
   pcregex = pcre2_compile(buffer, PCRE2_ZERO_TERMINATED, pcre2flags,
-       &errorCode, &errorOffset, NULL);
+       &errorCode, &errorOffset, nullptr);
   doneMatch(); // Cleanup buffers
   if (!pcregex) {
 #ifndef NDEBUG
@@ -165,7 +165,7 @@ RegExp::RegExp(const UString &p, int f)
     nrSubPatterns = 0; // fallback. We always need the first pair of offsets.
   }
 
-  match_data = pcre2_match_data_create_from_pattern(pcregex, NULL);
+  match_data = pcre2_match_data_create_from_pattern(pcregex, nullptr);
 #else
 
   int regflags = 0;
@@ -264,7 +264,7 @@ void RegExp::prepareUtf8(const UString& s)
 
 void RegExp::prepareASCII (const UString& s)
 {
-  originalPos = 0;
+  originalPos = nullptr;
 
   // Best-effort attempt to get something done
   // when we don't have utf 8 available -- use 
@@ -294,8 +294,8 @@ void RegExp::prepareMatch(const UString &s)
 
 void RegExp::doneMatch() 
 {
-  delete[] originalPos; originalPos = 0;
-  delete[] buffer;      buffer      = 0;
+  delete[] originalPos; originalPos = nullptr;
+  delete[] buffer;      buffer      = nullptr;
 }
 
 UString RegExp::match(const UString &s, int i, int *pos, int **ovector)
@@ -308,7 +308,7 @@ UString RegExp::match(const UString &s, int i, int *pos, int **ovector)
   if (i < 0)
     i = 0;
   if (ovector)
-    *ovector = 0L;
+    *ovector = nullptr;
   int dummyPos;
   if (!pos)
     pos = &dummyPos;
@@ -347,7 +347,7 @@ UString RegExp::match(const UString &s, int i, int *pos, int **ovector)
   {
     baseFlags |= PCRE2_NOTEMPTY | PCRE2_ANCHORED;
   }
-  int numMatches = pcre2_match(pcregex, buffer, PCRE2_ZERO_TERMINATED, startPos, baseFlags, match_data, NULL);
+  int numMatches = pcre2_match(pcregex, buffer, PCRE2_ZERO_TERMINATED, startPos, baseFlags, match_data, nullptr);
   if (numMatches <= 0)
   {
     // Failed to match.
@@ -360,7 +360,7 @@ UString RegExp::match(const UString &s, int i, int *pos, int **ovector)
 #endif
       m_notEmpty = 0;
       baseFlags = (utf8Support == Supported ? PCRE2_NO_UTF_CHECK : 0);
-      numMatches = pcre2_match(pcregex, buffer, PCRE2_ZERO_TERMINATED, nextPos, baseFlags, match_data, NULL);
+      numMatches = pcre2_match(pcregex, buffer, PCRE2_ZERO_TERMINATED, nextPos, baseFlags, match_data, nullptr);
       if (numMatches <= 0)
         return UString::null;
     }
diff --git a/kjs/regexp.h b/kjs/regexp.h
index d84fca17c..55f231ead 100644
--- a/kjs/regexp.h
+++ b/kjs/regexp.h
@@ -49,7 +49,7 @@ namespace KJS {
     int flags() const { return flgs; }
     UString pattern() const { return pat; }
     bool isValid() const { return valid; }
-    UString match(const UString &s, int i, int *pos = 0, int **ovector = 0);
+    UString match(const UString &s, int i, int *pos = nullptr, int **ovector = nullptr);
     // test is unused. The JS spec says that RegExp.test should use
     // RegExp.exec, so it has to store $1 etc.
     // bool test(const UString &s, int i = -1);
diff --git a/kjs/regexp_object.cpp b/kjs/regexp_object.cpp
index 976a36890..ebd98e862 100644
--- a/kjs/regexp_object.cpp
+++ b/kjs/regexp_object.cpp
@@ -38,7 +38,7 @@ using namespace KJS;
 
 // ECMA 15.9.4
 
-const ClassInfo RegExpPrototypeImp::info = {"RegExp", 0, 0, 0};
+const ClassInfo RegExpPrototypeImp::info = {"RegExp", nullptr, nullptr, nullptr};
 
 RegExpPrototypeImp::RegExpPrototypeImp(ExecState *exec,
                                        ObjectPrototypeImp *objProto,
@@ -120,7 +120,7 @@ Value RegExpProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg
     int **ovector = regExpObj->registerRegexp( re, s.value() );
 
     re->prepareMatch(s.value());
-    str = re->match(s.value(), i, 0L, ovector);
+    str = re->match(s.value(), i, nullptr, ovector);
     re->doneMatch();
     regExpObj->setSubPatterns(re->subPatterns());
 
@@ -171,10 +171,10 @@ Value RegExpProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg
 
 // ------------------------------ RegExpImp ------------------------------------
 
-const ClassInfo RegExpImp::info = {"RegExp", 0, 0, 0};
+const ClassInfo RegExpImp::info = {"RegExp", nullptr, nullptr, nullptr};
 
 RegExpImp::RegExpImp(RegExpPrototypeImp *regexpProto)
-  : ObjectImp(regexpProto), reg(0L)
+  : ObjectImp(regexpProto), reg(nullptr)
 {
 }
 
@@ -206,7 +206,7 @@ RegExpObjectImp::RegExpObjectImp(ExecState * /*exec*/,
                                  FunctionPrototypeImp *funcProto,
                                  RegExpPrototypeImp *regProto)
 
-  : InternalFunctionImp(funcProto), lastOvector(0L), lastNrSubPatterns(0)
+  : InternalFunctionImp(funcProto), lastOvector(nullptr), lastNrSubPatterns(0)
 {
   Value protect(this);
   // ECMA 15.10.5.1 RegExp.prototype
@@ -225,7 +225,7 @@ int **RegExpObjectImp::registerRegexp( const RegExp* re, const UString& s )
 {
   lastString = s;
   delete [] lastOvector;
-  lastOvector = 0;
+  lastOvector = nullptr;
   lastNrSubPatterns = re->subPatterns();
   return &lastOvector;
 }
@@ -300,7 +300,7 @@ RegExp* RegExpObjectImp::makeEngine(ExecState *exec, const UString &p, const Val
         Object err = Error::create(exec, SyntaxError,
                     "Invalid regular expression flags");
         exec->setException(err);
-        return 0;
+        return nullptr;
       }
     }
   }
@@ -323,7 +323,7 @@ RegExp* RegExpObjectImp::makeEngine(ExecState *exec, const UString &p, const Val
                                "Invalid regular expression");
     exec->setException(err);
     delete re;
-    return 0;
+    return nullptr;
   }
   return re;
 }
diff --git a/kjs/scope_chain.h b/kjs/scope_chain.h
index d7ddfbf8f..f468c0db6 100644
--- a/kjs/scope_chain.h
+++ b/kjs/scope_chain.h
@@ -46,7 +46,7 @@ namespace KJS {
 */
     class KJS_EXPORT ScopeChain {
     public:
-        ScopeChain() : _node(0) { }
+        ScopeChain() : _node(nullptr) { }
         ~ScopeChain() { deref(); }
 
         ScopeChain(const ScopeChain &c) : _node(c._node)
@@ -59,7 +59,7 @@ namespace KJS {
 				    while (n->next) n = n->next;
 				    return n->object; }
 
-        void clear() { deref(); _node = 0; }
+        void clear() { deref(); _node = nullptr; }
         void push(ObjectImp *);
         void pop();
 
diff --git a/kjs/string_object.cpp b/kjs/string_object.cpp
index 304a4ba34..8379d4a0e 100644
--- a/kjs/string_object.cpp
+++ b/kjs/string_object.cpp
@@ -42,7 +42,7 @@ using namespace KJS;
 
 // ------------------------------ StringInstanceImp ----------------------------
 
-const ClassInfo StringInstanceImp::info = {"String", 0, 0, 0};
+const ClassInfo StringInstanceImp::info = {"String", nullptr, nullptr, nullptr};
 
 StringInstanceImp::StringInstanceImp(ObjectImp *proto)
   : ObjectImp(proto)
@@ -121,7 +121,7 @@ ReferenceList StringInstanceImp::propList(ExecState *exec, bool recursive)
 }
 
 // ------------------------------ StringPrototypeImp ---------------------------
-const ClassInfo StringPrototypeImp::info = {"String", &StringInstanceImp::info, &stringTable, 0};
+const ClassInfo StringPrototypeImp::info = {"String", &StringInstanceImp::info, &stringTable, nullptr};
 /* Source for string_object.lut.h
 @begin stringTable 28
   toString		StringProtoFuncImp::ToString	DontEnum|Function	0
@@ -281,8 +281,8 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg
     break;
   case Match:
   case Search: {
-    RegExp *reg, *tmpReg = 0;
-    RegExpImp *imp = 0;
+    RegExp *reg, *tmpReg = nullptr;
+    RegExpImp *imp = nullptr;
     if (a0.isA(ObjectType) && a0.toObject(exec).inherits(&RegExpImp::info))
     {
       imp = static_cast<RegExpImp *>( a0.toObject(exec).imp() );
@@ -476,9 +476,9 @@ Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &arg
       while (static_cast<uint32_t>(i) != limit && pos < s.size()) {
 	// TODO: back references
         int mpos;
-        int *ovector = 0L;
+        int *ovector = nullptr;
 	UString mstr = reg.match(s, pos, &mpos, &ovector);
-        delete [] ovector; ovector = 0L;
+        delete [] ovector; ovector = nullptr;
 	if (mpos < 0)
 	  break;
 	pos = mpos + (mstr.isEmpty() ? 1 : mstr.size());
diff --git a/kjs/ustring.cpp b/kjs/ustring.cpp
index dfe78f263..aaee4e67c 100644
--- a/kjs/ustring.cpp
+++ b/kjs/ustring.cpp
@@ -112,7 +112,7 @@ CString &CString::operator=(const CString &str)
     memcpy(data, str.data, length + 1);
   }
   else
-    data = 0;
+    data = nullptr;
 
   return *this;
 }
@@ -124,11 +124,11 @@ bool KJS::operator==(const KJS::CString& c1, const KJS::CString& c2)
 }
 
 UChar UChar::null((char)0);
-UString::Rep UString::Rep::null = { 0, 0, 0, 1, 1 };
-UString::Rep UString::Rep::empty = { 0, 0, 0, 1, 1 };
+UString::Rep UString::Rep::null = { nullptr, 0, 0, 1, 1 };
+UString::Rep UString::Rep::empty = { nullptr, 0, 0, 1, 1 };
 UString UString::null;
 static const int normalStatBufferSize = 4096;
-static char *statBuffer = 0;
+static char *statBuffer = nullptr;
 static int statBufferSize = 0;
 
 UChar UChar::toLower() const
@@ -392,7 +392,7 @@ UString UString::from(double d)
   int decimalPoint;
   int sign;
 
-  char *result = kjs_dtoa(d, 0, 0, &decimalPoint, &sign, NULL);
+  char *result = kjs_dtoa(d, 0, 0, &decimalPoint, &sign, nullptr);
   int length = strlen(result);
 
   int i = 0;
@@ -514,7 +514,7 @@ char *UString::ascii() const
 void UString::globalClear()
 {
   delete [] statBuffer;
-  statBuffer = 0;
+  statBuffer = nullptr;
   statBufferSize = 0;
 }
 #endif
@@ -924,7 +924,7 @@ bool KJS::operator==(const UString& s1, const UString& s2)
 
 bool KJS::operator==(const UString& s1, const char *s2)
 {
-  if (s2 == 0) {
+  if (!s2) {
     return s1.isEmpty();
   }
 
diff --git a/kjs/ustring.h b/kjs/ustring.h
index a5fc55897..2818ea273 100644
--- a/kjs/ustring.h
+++ b/kjs/ustring.h
@@ -164,7 +164,7 @@ namespace KJS {
    */
   class KJS_EXPORT CString {
   public:
-    CString() : data(0L), length(0) { }
+    CString() : data(nullptr), length(0) { }
     CString(const char *c);
     CString(const char *c, int len);
     CString(const CString &);
@@ -384,10 +384,10 @@ namespace KJS {
      * @param tolerateEmptyString if false, toULong will return false for *ok for an empty string.
      */
     unsigned long toULong(bool *ok, bool tolerateEmptyString) const;
-    unsigned long toULong(bool *ok = 0) const;
+    unsigned long toULong(bool *ok = nullptr) const;
 
-    unsigned int toUInt32(bool *ok = 0) const;
-    unsigned int toStrictUInt32(bool *ok = 0) const;
+    unsigned int toUInt32(bool *ok = nullptr) const;
+    unsigned int toStrictUInt32(bool *ok = nullptr) const;
 
     /**
      * Attempts an conversion to an array index. The "ok" boolean will be set
@@ -395,7 +395,7 @@ namespace KJS {
      * ECMA 15.2 about what an array index is. It must exactly match the string
      * form of an unsigned integer, and be less than 2^32 - 1.
      */
-    unsigned toArrayIndex(bool *ok = 0) const;
+    unsigned toArrayIndex(bool *ok = nullptr) const;
 
     /**
      * Returns this string converted to lower case characters
diff --git a/kjs/value.cpp b/kjs/value.cpp
index d5a7a9731..72ad3f507 100644
--- a/kjs/value.cpp
+++ b/kjs/value.cpp
@@ -289,7 +289,7 @@ Undefined::Undefined() : Value(UndefinedImp::staticUndefined)
 Undefined Undefined::dynamicCast(const Value &v)
 {
   if (!v.isValid() || v.type() != UndefinedType)
-    return Undefined(0);
+    return Undefined(nullptr);
 
   return Undefined();
 }
@@ -303,7 +303,7 @@ Null::Null() : Value(NullImp::staticNull)
 Null Null::dynamicCast(const Value &v)
 {
   if (!v.isValid() || v.type() != NullType)
-    return Null(0);
+    return Null(nullptr);
 
   return Null();
 }
@@ -324,7 +324,7 @@ bool Boolean::value() const
 Boolean Boolean::dynamicCast(const Value &v)
 {
   if (!v.isValid() || v.type() != BooleanType)
-    return static_cast<BooleanImp*>(0);
+    return Boolean(static_cast<BooleanImp *>(nullptr));
 
   return static_cast<BooleanImp*>(v.imp());
 }
@@ -348,7 +348,7 @@ UString String::value() const
 String String::dynamicCast(const Value &v)
 {
   if (!v.isValid() || v.type() != StringType)
-    return String(0);
+    return String(nullptr);
 
   return String(static_cast<StringImp*>(v.imp()));
 }
@@ -379,7 +379,7 @@ Number::Number(long unsigned int l)
 Number Number::dynamicCast(const Value &v)
 {
   if (!v.isValid() || v.type() != NumberType)
-    return Number((NumberImp*)0);
+    return Number(nullptr);
 
   return Number(static_cast<NumberImp*>(v.imp()));
 }
diff --git a/kjs/value.h b/kjs/value.h
index a54aa9240..db2b6db61 100644
--- a/kjs/value.h
+++ b/kjs/value.h
@@ -166,7 +166,7 @@ namespace KJS {
    */
   class KJS_EXPORT Value {
   public:
-    Value() : rep(0) { }
+    Value() : rep(nullptr) { }
     explicit Value(ValueImp *v);
     Value(const Value &v);
     ~Value();
@@ -178,12 +178,12 @@ namespace KJS {
      * any other operation than this check. Current use: as a
      * distinct return value signalling failing dynamicCast() calls.
      */
-    bool isValid() const { return rep != 0; }
+    bool isValid() const { return rep != nullptr; }
     /**
      * @deprecated
      * Use !isValid() instead.
      */
-    bool isNull() const { return rep == 0; }
+    bool isNull() const { return rep == nullptr; }
     ValueImp *imp() const { return rep; }
 
     /**
diff --git a/tdehtml/css/css_base.cpp b/tdehtml/css/css_base.cpp
index 699ff6554..4e91b3623 100644
--- a/tdehtml/css/css_base.cpp
+++ b/tdehtml/css/css_base.cpp
@@ -110,9 +110,9 @@ StyleListImpl::~StyleListImpl()
 
     if(!m_lstChildren) return;
 
-    for( n = m_lstChildren->first(); n != 0; n = m_lstChildren->next() )
+    for( n = m_lstChildren->first(); n; n = m_lstChildren->next() )
     {
-        n->setParent(0);
+        n->setParent(nullptr);
         if( !n->refCount() ) delete n;
     }
     delete m_lstChildren;
@@ -325,7 +325,7 @@ DOMString CSSSelector::selectorText() const
     else if (tag != anyLocalName)
         str = getTagName( cs->tag );
 
-    const CSSSelector* op = 0;
+    const CSSSelector* op = nullptr;
     while (true) {
         if ( cs->attr == ATTR_ID && cs->match == CSSSelector::Id )
         {
@@ -393,7 +393,7 @@ DOMString CSSSelector::selectorText() const
         }
         if (op && !cs->tagHistory) {
             cs=op;
-            op=0;
+            op=nullptr;
             str += ")";
         }
 
diff --git a/tdehtml/css/css_base.h b/tdehtml/css/css_base.h
index d39d5e94d..d216c65fb 100644
--- a/tdehtml/css/css_base.h
+++ b/tdehtml/css/css_base.h
@@ -65,7 +65,7 @@ namespace DOM {
                 return this;
             if (m_parent)
                 return m_parent->namespaceForPrefix(prefix);
-            return 0;
+            return nullptr;
         }
     };
 
@@ -74,7 +74,7 @@ namespace DOM {
     {
     public:
 	CSSSelector()
-	    : tagHistory(0), simpleSelector(0), attr(0), tag(anyQName), relation( Descendant ),
+	    : tagHistory(nullptr), simpleSelector(nullptr), attr(0), tag(anyQName), relation( Descendant ),
 	      match( None ), nonCSSHint( false ), pseudoId( 0 ), _pseudoType(PseudoNotParsed)
         {}
 
@@ -194,7 +194,7 @@ namespace DOM {
     class StyleBaseImpl : public tdehtml::TreeShared<StyleBaseImpl>
     {
     public:
-	StyleBaseImpl()  { m_parent = 0; hasInlinedDecl = false; strictParsing = true; multiLength = false; }
+	StyleBaseImpl()  { m_parent = nullptr; hasInlinedDecl = false; strictParsing = true; multiLength = false; }
 	StyleBaseImpl(StyleBaseImpl *p) {
 	    m_parent = p; hasInlinedDecl = false;
 	    strictParsing = (m_parent ? m_parent->useStrictParsing() : true);
@@ -251,8 +251,8 @@ namespace DOM {
     class StyleListImpl : public StyleBaseImpl
     {
     public:
-	StyleListImpl() : StyleBaseImpl() { m_lstChildren = 0; }
-	StyleListImpl(StyleBaseImpl *parent) : StyleBaseImpl(parent) { m_lstChildren = 0; }
+	StyleListImpl() : StyleBaseImpl() { m_lstChildren = nullptr; }
+	StyleListImpl(StyleBaseImpl *parent) : StyleBaseImpl(parent) { m_lstChildren = nullptr; }
 	virtual ~StyleListImpl();
 
 	unsigned long length() const { return m_lstChildren->count(); }
diff --git a/tdehtml/css/css_renderstyledeclarationimpl.cpp b/tdehtml/css/css_renderstyledeclarationimpl.cpp
index c126007fd..c45123071 100644
--- a/tdehtml/css/css_renderstyledeclarationimpl.cpp
+++ b/tdehtml/css/css_renderstyledeclarationimpl.cpp
@@ -160,7 +160,7 @@ static CSSValueImpl *valueForBorderStyle(EBorderStyle style)
         return new CSSPrimitiveValueImpl(CSS_VAL_DOUBLE);
     }
     Q_ASSERT( 0 );
-    return 0;
+    return nullptr;
 }
 
 static CSSValueImpl *valueForTextAlign(ETextAlign align)
@@ -184,7 +184,7 @@ static CSSValueImpl *valueForTextAlign(ETextAlign align)
         return new CSSPrimitiveValueImpl(CSS_VAL__TDEHTML_CENTER);
     }
     Q_ASSERT( 0 );
-    return 0;
+    return nullptr;
 }
 
 DOMString tdehtml::stringForListStyleType(EListStyleType type)
@@ -293,11 +293,11 @@ static CSSValueImpl* valueForShadow(const ShadowData *shadow)
 static CSSValueImpl *getPositionOffsetValue(RenderObject *renderer, int propertyID)
 {
     if (!renderer)
-        return 0;
+        return nullptr;
 
     RenderStyle *style = renderer->style();
     if (!style)
-        return 0;
+        return nullptr;
 
     Length l;
     switch (propertyID) {
@@ -314,7 +314,7 @@ static CSSValueImpl *getPositionOffsetValue(RenderObject *renderer, int property
         l = style->bottom();
         break;
     default:
-        return 0;
+        return nullptr;
     }
 
     if (renderer->isPositioned())
@@ -330,7 +330,7 @@ static CSSValueImpl *getPositionOffsetValue(RenderObject *renderer, int property
  }
 
 RenderStyleDeclarationImpl::RenderStyleDeclarationImpl( DOM::NodeImpl *node )
-    : CSSStyleDeclarationImpl(0), m_node(node)
+    : CSSStyleDeclarationImpl(nullptr), m_node(node)
 {
     //kdDebug() << "Render Style Declaration created" << endl;
 }
@@ -365,7 +365,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
 {
     NodeImpl *node = m_node.get();
     if (!node)
-        return 0;
+        return nullptr;
 
     // Make sure our layout is up to date before we allow a query on these attributes.
     DocumentImpl* docimpl = node->getDocument();
@@ -375,10 +375,10 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
 
     RenderObject *renderer = m_node->renderer();
     if (!renderer)
-        return 0;
+        return nullptr;
     RenderStyle *style = renderer->style();
     if (!style)
-        return 0;
+        return nullptr;
 
     switch(propertyID)
     {
@@ -727,7 +727,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
             return new CSSPrimitiveValueImpl(CSS_VAL_RIGHT);
         }
         Q_ASSERT(0);
-        return 0;
+        return nullptr;
     case CSS_PROP__TDEHTML_MARQUEE_INCREMENT:
         return valueForLength(style->marqueeIncrement(), renderer->contentWidth());
     case CSS_PROP__TDEHTML_MARQUEE_REPETITION:
@@ -751,7 +751,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
             return new CSSPrimitiveValueImpl(CSS_VAL_UNFURL);
         }
         Q_ASSERT(0);
-        return 0;
+        return nullptr;
     case CSS_PROP_MAX_HEIGHT:
         return new CSSPrimitiveValueImpl( renderer->availableHeight(),
                                           CSSPrimitiveValue::CSS_PX );
@@ -809,7 +809,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
             return new CSSPrimitiveValueImpl(CSS_VAL_MARQUEE);
         }
         Q_ASSERT(0);
-        return 0;
+        return nullptr;
     }
     case CSS_PROP_PADDING_TOP:
         return valueForLength(style->paddingTop(), renderer->contentHeight());
@@ -1068,7 +1068,7 @@ CSSValueImpl *RenderStyleDeclarationImpl::getPropertyCSSValue( int propertyID )
         Q_ASSERT( 0 );
         break;
     }
-    return 0;
+    return nullptr;
 }
 
 DOMString RenderStyleDeclarationImpl::getPropertyValue( int propertyID ) const
diff --git a/tdehtml/css/css_ruleimpl.cpp b/tdehtml/css/css_ruleimpl.cpp
index 0edd3a511..4be68fa13 100644
--- a/tdehtml/css/css_ruleimpl.cpp
+++ b/tdehtml/css/css_ruleimpl.cpp
@@ -42,13 +42,13 @@ using namespace DOM;
 CSSStyleSheetImpl *CSSRuleImpl::parentStyleSheet() const
 {
     return ( m_parent && m_parent->isCSSStyleSheet() )  ?
-	static_cast<CSSStyleSheetImpl *>(m_parent) : 0;
+	static_cast<CSSStyleSheetImpl *>(m_parent) : nullptr;
 }
 
 CSSRuleImpl *CSSRuleImpl::parentRule() const
 {
     return ( m_parent && m_parent->isRule() )  ?
-	static_cast<CSSRuleImpl *>(m_parent) : 0;
+	static_cast<CSSRuleImpl *>(m_parent) : nullptr;
 }
 
 DOM::DOMString CSSRuleImpl::cssText() const
@@ -68,7 +68,7 @@ CSSFontFaceRuleImpl::CSSFontFaceRuleImpl(StyleBaseImpl *parent)
     : CSSRuleImpl(parent)
 {
     m_type = CSSRule::FONT_FACE_RULE;
-    m_style = 0;
+    m_style = nullptr;
 }
 
 CSSFontFaceRuleImpl::~CSSFontFaceRuleImpl()
@@ -92,9 +92,9 @@ CSSImportRuleImpl::CSSImportRuleImpl( StyleBaseImpl *parent,
     m_lstMedia->ref();
 
     m_strHref = href;
-    m_styleSheet = 0;
+    m_styleSheet = nullptr;
 
-    m_cachedSheet = 0;
+    m_cachedSheet = nullptr;
 
     init();
 }
@@ -109,9 +109,9 @@ CSSImportRuleImpl::CSSImportRuleImpl( StyleBaseImpl *parent,
     m_lstMedia->ref();
 
     m_strHref = href;
-    m_styleSheet = 0;
+    m_styleSheet = nullptr;
 
-    m_cachedSheet = 0;
+    m_cachedSheet = nullptr;
 
     init();
 }
@@ -119,11 +119,11 @@ CSSImportRuleImpl::CSSImportRuleImpl( StyleBaseImpl *parent,
 CSSImportRuleImpl::~CSSImportRuleImpl()
 {
     if( m_lstMedia ) {
- 	m_lstMedia->setParent( 0 );
+	m_lstMedia->setParent( nullptr );
 	m_lstMedia->deref();
     }
     if(m_styleSheet) {
-        m_styleSheet->setParent(0);
+        m_styleSheet->setParent(nullptr);
         m_styleSheet->deref();
     }
 
@@ -133,7 +133,7 @@ CSSImportRuleImpl::~CSSImportRuleImpl()
 void CSSImportRuleImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheet, const DOM::DOMString &charset)
 {
     if ( m_styleSheet ) {
-        m_styleSheet->setParent(0);
+        m_styleSheet->setParent(nullptr);
         m_styleSheet->deref();
     }
     m_styleSheet = new CSSStyleSheetImpl(this, url);
@@ -151,10 +151,10 @@ void CSSImportRuleImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMS
 void CSSImportRuleImpl::error(int /*err*/, const TQString &/*text*/)
 {
     if ( m_styleSheet ) {
-        m_styleSheet->setParent(0);
+        m_styleSheet->setParent(nullptr);
         m_styleSheet->deref();
     }
-    m_styleSheet = 0;
+    m_styleSheet = nullptr;
 
     m_loading = false;
     m_done = true;
@@ -171,7 +171,7 @@ void CSSImportRuleImpl::init()
 {
     m_loading = 0;
     m_done = false;
-    tdehtml::DocLoader *docLoader = 0;
+    tdehtml::DocLoader *docLoader = nullptr;
     StyleBaseImpl *root = this;
     StyleBaseImpl *parent;
     while ( ( parent = root->parent()) )
@@ -232,7 +232,7 @@ CSSMediaRuleImpl::CSSMediaRuleImpl(StyleBaseImpl *parent)
     :   CSSRuleImpl( parent )
 {
     m_type = CSSRule::MEDIA_RULE;
-    m_lstMedia = 0;
+    m_lstMedia = nullptr;
     m_lstCSSRules = new CSSRuleListImpl();
     m_lstCSSRules->ref();
 }
@@ -250,11 +250,11 @@ CSSMediaRuleImpl::CSSMediaRuleImpl( StyleBaseImpl *parent, const DOM::DOMString
 CSSMediaRuleImpl::~CSSMediaRuleImpl()
 {
     if( m_lstMedia ) {
-	m_lstMedia->setParent( 0 );
+	m_lstMedia->setParent( nullptr );
         m_lstMedia->deref();
     }
     for ( unsigned int i = 0; i < m_lstCSSRules->length(); ++i )
-        m_lstCSSRules->item(  i )->setParent(  0 );
+        m_lstCSSRules->item(  i )->setParent(  nullptr );
     m_lstCSSRules->deref();
 }
 
@@ -285,7 +285,7 @@ CSSPageRuleImpl::CSSPageRuleImpl(StyleBaseImpl *parent)
     : CSSRuleImpl(parent)
 {
     m_type = CSSRule::PAGE_RULE;
-    m_style = 0;
+    m_style = nullptr;
 }
 
 CSSPageRuleImpl::~CSSPageRuleImpl()
@@ -310,14 +310,14 @@ CSSStyleRuleImpl::CSSStyleRuleImpl(StyleBaseImpl *parent)
     : CSSRuleImpl(parent)
 {
     m_type = CSSRule::STYLE_RULE;
-    m_style = 0;
-    m_selector = 0;
+    m_style = nullptr;
+    m_selector = nullptr;
 }
 
 CSSStyleRuleImpl::~CSSStyleRuleImpl()
 {
     if(m_style) {
-	m_style->setParent( 0 );
+	m_style->setParent( nullptr );
 	m_style->deref();
     }
     delete m_selector;
diff --git a/tdehtml/css/css_stylesheetimpl.cpp b/tdehtml/css/css_stylesheetimpl.cpp
index 40fa0dc0c..6da810a5f 100644
--- a/tdehtml/css/css_stylesheetimpl.cpp
+++ b/tdehtml/css/css_stylesheetimpl.cpp
@@ -47,8 +47,8 @@ StyleSheetImpl::StyleSheetImpl(StyleSheetImpl *parentSheet, DOMString href)
     : StyleListImpl(parentSheet)
 {
     m_disabled = false;
-    m_media = 0;
-    m_parentNode = 0;
+    m_media = nullptr;
+    m_parentNode = nullptr;
     m_strHref = href;
 }
 
@@ -58,7 +58,7 @@ StyleSheetImpl::StyleSheetImpl(DOM::NodeImpl *parentNode, DOMString href)
 {
     m_parentNode = parentNode;
     m_disabled = false;
-    m_media = 0;
+    m_media = nullptr;
     m_strHref = href;
 }
 
@@ -66,25 +66,25 @@ StyleSheetImpl::StyleSheetImpl(StyleBaseImpl *owner, DOMString href)
     : StyleListImpl(owner)
 {
     m_disabled = false;
-    m_media = 0;
-    m_parentNode = 0;
+    m_media = nullptr;
+    m_parentNode = nullptr;
     m_strHref = href;
 }
 
 StyleSheetImpl::~StyleSheetImpl()
 {
     if(m_media) {
-	m_media->setParent( 0 );
+	m_media->setParent( nullptr );
 	m_media->deref();
     }
 }
 
 StyleSheetImpl *StyleSheetImpl::parentStyleSheet() const
 {
-    if( !m_parent ) return 0;
+    if( !m_parent ) return nullptr;
     if( m_parent->isStyleSheet() ) return static_cast<StyleSheetImpl *>(m_parent);
     if( m_parent->isRule() ) return m_parent->stylesheet();
-    return 0;
+    return nullptr;
 }
 
 void StyleSheetImpl::setMedia( MediaListImpl *media )
@@ -111,9 +111,9 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSStyleSheetImpl *parentSheet, DOMString h
     : StyleSheetImpl(parentSheet, href)
 {
     m_lstChildren = new TQPtrList<StyleBaseImpl>;
-    m_doc = parentSheet ? parentSheet->doc() : 0;
+    m_doc = parentSheet ? parentSheet->doc() : nullptr;
     m_implicit = false;
-    m_namespaces = 0;
+    m_namespaces = nullptr;
     m_defaultNamespace = anyNamespace;
 }
 
@@ -123,7 +123,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, DOMString href,
     m_lstChildren = new TQPtrList<StyleBaseImpl>;
     m_doc = parentNode->getDocument();
     m_implicit = _implicit;
-    m_namespaces = 0;
+    m_namespaces = nullptr;
     m_defaultNamespace = anyNamespace;
 }
 
@@ -133,7 +133,7 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, DOMString href)
     m_lstChildren = new TQPtrList<StyleBaseImpl>;
     m_doc = static_cast<CSSStyleSheetImpl*>(ownerRule->stylesheet())->doc();
     m_implicit = false;
-    m_namespaces = 0;
+    m_namespaces = nullptr;
     m_defaultNamespace = anyNamespace;
 }
 
@@ -142,14 +142,14 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(DOM::NodeImpl *parentNode, CSSStyleSheetImp
 {
     m_lstChildren = new TQPtrList<StyleBaseImpl>;
     StyleBaseImpl *rule;
-    for ( rule = orig->m_lstChildren->first(); rule != 0; rule = orig->m_lstChildren->next() )
+    for ( rule = orig->m_lstChildren->first(); rule; rule = orig->m_lstChildren->next() )
     {
         m_lstChildren->append(rule);
         rule->setParent(this);
     }
     m_doc = parentNode->getDocument();
     m_implicit = false;
-    m_namespaces = 0;
+    m_namespaces = nullptr;
     m_defaultNamespace = anyNamespace;
 }
 
@@ -159,22 +159,22 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(CSSRuleImpl *ownerRule, CSSStyleSheetImpl *
     // m_lstChildren is deleted in StyleListImpl
     m_lstChildren = new TQPtrList<StyleBaseImpl>;
     StyleBaseImpl *rule;
-    for ( rule = orig->m_lstChildren->first(); rule != 0; rule = orig->m_lstChildren->next() )
+    for ( rule = orig->m_lstChildren->first(); rule; rule = orig->m_lstChildren->next() )
     {
         m_lstChildren->append(rule);
         rule->setParent(this);
     }
     m_doc = static_cast<CSSStyleSheetImpl*>(ownerRule->stylesheet())->doc();
     m_implicit = false;
-    m_namespaces = 0;
+    m_namespaces = nullptr;
     m_defaultNamespace = anyNamespace;
 }
 
 CSSRuleImpl *CSSStyleSheetImpl::ownerRule() const
 {
-    if( !m_parent ) return 0;
+    if( !m_parent ) return nullptr;
     if( m_parent->isRule() ) return static_cast<CSSRuleImpl *>(m_parent);
-    return 0;
+    return nullptr;
 }
 
 unsigned long CSSStyleSheetImpl::insertRule( const DOMString &rule, unsigned long index, int &exceptioncode )
@@ -214,7 +214,7 @@ void CSSStyleSheetImpl::deleteRule( unsigned long index, int &exceptioncode )
         return;
     }
     // TreeShared requires delete not deref when removed from tree
-    b->setParent(0);
+    b->setParent(nullptr);
     if( !b->refCount() ) delete b;
     if (m_doc)
         m_doc->updateStyleSelector(true /*shallow*/);
@@ -229,7 +229,7 @@ void CSSStyleSheetImpl::addNamespace(CSSParser* p, const DOM::DOMString& prefix,
     m_namespaces = new CSSNamespace(prefix, uri, m_namespaces);
 
     if (prefix.isEmpty()) {
-        Q_ASSERT(m_doc != 0);
+        Q_ASSERT(m_doc);
 
         m_defaultNamespace = m_doc->getId(NodeImpl::NamespaceId, uri.implementation(), false, false, &exceptioncode);
     }
@@ -250,10 +250,10 @@ void CSSStyleSheetImpl::determineNamespace(TQ_UINT32& id, const DOM::DOMString&
         int exceptioncode = 0;
         CSSNamespace* ns = m_namespaces->namespaceForPrefix(prefix);
         if (ns) {
-            Q_ASSERT(m_doc != 0);
+            Q_ASSERT(m_doc);
 
             // Look up the id for this namespace URI.
-            TQ_UINT16 nsid = m_doc->getId(NodeImpl::NamespaceId, 0, 0, ns->uri().implementation(), false, false, &exceptioncode);
+            TQ_UINT16 nsid = m_doc->getId(NodeImpl::NamespaceId, nullptr, nullptr, ns->uri().implementation(), false, false, &exceptioncode);
             id = makeId(nsid, localNamePart(id));
         }
     }
@@ -274,7 +274,7 @@ bool CSSStyleSheetImpl::parseString(const DOMString &string, bool strict)
 bool CSSStyleSheetImpl::isLoading() const
 {
     StyleBaseImpl *rule;
-    for ( rule = m_lstChildren->first(); rule != 0; rule = m_lstChildren->next() )
+    for ( rule = m_lstChildren->first(); rule; rule = m_lstChildren->next() )
     {
         if(rule->isImportRule())
         {
@@ -359,7 +359,7 @@ StyleSheetImpl *StyleSheetListImpl::item ( unsigned long index )
             ++l;
         }
     }
-    return 0;
+    return nullptr;
 }
 
 // --------------------------------------------------------------------------------------------
@@ -386,13 +386,13 @@ bool MediaListImpl::contains( const DOMString &medium ) const
 CSSStyleSheetImpl *MediaListImpl::parentStyleSheet() const
 {
     if( m_parent->isCSSStyleSheet() ) return static_cast<CSSStyleSheetImpl *>(m_parent);
-    return 0;
+    return nullptr;
 }
 
 CSSRuleImpl *MediaListImpl::parentRule() const
 {
     if( m_parent->isRule() ) return static_cast<CSSRuleImpl *>(m_parent);
-    return 0;
+    return nullptr;
 }
 
 void MediaListImpl::deleteMedium( const DOMString &oldMedium )
diff --git a/tdehtml/css/css_stylesheetimpl.h b/tdehtml/css/css_stylesheetimpl.h
index 8b59003ed..6c3e53d9e 100644
--- a/tdehtml/css/css_stylesheetimpl.h
+++ b/tdehtml/css/css_stylesheetimpl.h
@@ -116,7 +116,7 @@ public:
 
     // ### remove? (clients should use sheet->doc()->docLoader())
     tdehtml::DocLoader *docLoader() const
-    { return m_doc ? m_doc->docLoader() : 0; }
+    { return m_doc ? m_doc->docLoader() : nullptr; }
 
     DocumentImpl *doc() const { return m_doc; }
     bool implicit() const { return m_implicit; }
@@ -152,7 +152,7 @@ class MediaListImpl : public StyleBaseImpl
 {
 public:
     MediaListImpl()
-	: StyleBaseImpl( 0 ) {}
+	: StyleBaseImpl( nullptr ) {}
     MediaListImpl( CSSStyleSheetImpl *parentSheet )
         : StyleBaseImpl(parentSheet) {}
     MediaListImpl( CSSStyleSheetImpl *parentSheet,
diff --git a/tdehtml/css/css_valueimpl.cpp b/tdehtml/css/css_valueimpl.cpp
index 31f0d6be2..82e6bc389 100644
--- a/tdehtml/css/css_valueimpl.cpp
+++ b/tdehtml/css/css_valueimpl.cpp
@@ -66,22 +66,22 @@ static DOMString quoteStringIfNeeded(const DOMString &string)
 CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent)
     : StyleBaseImpl(parent)
 {
-    m_lstValues = 0;
-    m_node = 0;
+    m_lstValues = nullptr;
+    m_node = nullptr;
 }
 
 CSSStyleDeclarationImpl::CSSStyleDeclarationImpl(CSSRuleImpl *parent, TQPtrList<CSSProperty> *lstValues)
     : StyleBaseImpl(parent)
 {
     m_lstValues = lstValues;
-    m_node = 0;
+    m_node = nullptr;
 }
 
 CSSStyleDeclarationImpl&  CSSStyleDeclarationImpl::operator= (const CSSStyleDeclarationImpl& o)
 {
     // don't attach it to the same node, just leave the current m_node value
     delete m_lstValues;
-    m_lstValues = 0;
+    m_lstValues = nullptr;
     if (o.m_lstValues) {
         m_lstValues = new TQPtrList<CSSProperty>;
         m_lstValues->setAutoDelete( true );
@@ -231,14 +231,14 @@ DOMString CSSStyleDeclarationImpl::getShortHandValue( const int* properties, int
 
  CSSValueImpl *CSSStyleDeclarationImpl::getPropertyCSSValue( int propertyID ) const
 {
-    if(!m_lstValues) return 0;
+    if(!m_lstValues) return nullptr;
 
     TQPtrListIterator<CSSProperty> lstValuesIt(*m_lstValues);
     CSSProperty *current;
     for ( lstValuesIt.toLast(); (current = lstValuesIt.current()); --lstValuesIt )
         if (current->m_id == propertyID && !current->nonCSSHint)
             return current->value();
-    return 0;
+    return nullptr;
 }
 
 DOMString CSSStyleDeclarationImpl::removeProperty( int propertyID, bool NonCSSHint )
@@ -366,7 +366,7 @@ DOMString CSSStyleDeclarationImpl::item( unsigned long index ) const
 CSSRuleImpl *CSSStyleDeclarationImpl::parentRule() const
 {
     return (m_parent && m_parent->isRule() ) ?
-	static_cast<CSSRuleImpl *>(m_parent) : 0;
+	static_cast<CSSRuleImpl *>(m_parent) : nullptr;
 }
 
 DOM::DOMString CSSStyleDeclarationImpl::cssText() const
@@ -784,10 +784,10 @@ DOM::DOMString CSSPrimitiveValueImpl::cssText() const
 
 RectImpl::RectImpl()
 {
-    m_top = 0;
-    m_right = 0;
-    m_bottom = 0;
-    m_left = 0;
+    m_top = nullptr;
+    m_right = nullptr;
+    m_bottom = nullptr;
+    m_left = nullptr;
 }
 
 RectImpl::~RectImpl()
@@ -854,7 +854,7 @@ void PairImpl::setSecond(CSSPrimitiveValueImpl* second)
 CSSImageValueImpl::CSSImageValueImpl(const DOMString &url, const StyleBaseImpl* style)
     : CSSPrimitiveValueImpl(url, CSSPrimitiveValue::CSS_URI)
 {
-    tdehtml::DocLoader *docLoader = 0;
+    tdehtml::DocLoader *docLoader = nullptr;
     const StyleBaseImpl *root = style;
     while (root->parent())
 	root = root->parent();
@@ -868,7 +868,7 @@ CSSImageValueImpl::CSSImageValueImpl(const DOMString &url, const StyleBaseImpl*
 CSSImageValueImpl::CSSImageValueImpl()
     : CSSPrimitiveValueImpl(CSS_VAL_NONE)
 {
-    m_image = 0;
+    m_image = nullptr;
 }
 
 CSSImageValueImpl::~CSSImageValueImpl()
@@ -921,7 +921,7 @@ FontFamilyValueImpl::FontFamilyValueImpl( const TQString &string)
 }
 
 FontValueImpl::FontValueImpl()
-    : style(0), variant(0), weight(0), size(0), lineHeight(0), family(0)
+    : style(nullptr), variant(nullptr), weight(nullptr), size(nullptr), lineHeight(nullptr), family(nullptr)
 {
 }
 
diff --git a/tdehtml/css/css_valueimpl.h b/tdehtml/css/css_valueimpl.h
index 952c81f8c..2df6ea775 100644
--- a/tdehtml/css/css_valueimpl.h
+++ b/tdehtml/css/css_valueimpl.h
@@ -196,14 +196,14 @@ public:
 	return ( ( m_type < CSSPrimitiveValue::CSS_STRING ||
 		   m_type > CSSPrimitiveValue::CSS_ATTR ||
 		   m_type == CSSPrimitiveValue::CSS_IDENT ) ? // fix IDENT
-		 0 : m_value.string );
+		 nullptr : m_value.string );
     }
     CounterImpl *getCounterValue () const {
-        return ( m_type != CSSPrimitiveValue::CSS_COUNTER ? 0 : m_value.counter );
+        return ( m_type != CSSPrimitiveValue::CSS_COUNTER ? nullptr : m_value.counter );
     }
 
     RectImpl *getRectValue () const {
-	return ( m_type != CSSPrimitiveValue::CSS_RECT ? 0 : m_value.rect );
+	return ( m_type != CSSPrimitiveValue::CSS_RECT ? nullptr : m_value.rect );
     }
 
     TQRgb getRGBColorValue () const {
@@ -211,7 +211,7 @@ public:
     }
 
     PairImpl* getPairValue() const {
-        return (m_type != CSSPrimitiveValue::CSS_PAIR ? 0 : m_value.pair);
+        return (m_type != CSSPrimitiveValue::CSS_PAIR ? nullptr : m_value.pair);
     }
 
     virtual bool isPrimitiveValue() const { return true; }
@@ -291,7 +291,7 @@ protected:
 // it (eliminating some extra -webkit- internal properties).
 class PairImpl : public tdehtml::Shared<PairImpl> {
 public:
-    PairImpl() : m_first(0), m_second(0) { }
+    PairImpl() : m_first(nullptr), m_second(nullptr) { }
     PairImpl(CSSPrimitiveValueImpl* first, CSSPrimitiveValueImpl* second)
         : m_first(first), m_second(second) { if (first) first->ref(); if (second) second->ref(); }
     virtual ~PairImpl();
@@ -417,7 +417,7 @@ public:
 	m_id = -1;
 	m_important = false;
 	nonCSSHint = false;
-        m_value = 0;
+        m_value = nullptr;
     }
     CSSProperty(const CSSProperty& o)
     {
diff --git a/tdehtml/css/cssparser.cpp b/tdehtml/css/cssparser.cpp
index b4b531df0..cfb39e967 100644
--- a/tdehtml/css/cssparser.cpp
+++ b/tdehtml/css/cssparser.cpp
@@ -85,7 +85,7 @@ extern int cssyydebug;
 
 extern int cssyyparse( void * parser );
 
-CSSParser *CSSParser::currentParser = 0;
+CSSParser *CSSParser::currentParser = nullptr;
 
 CSSParser::CSSParser( bool strictParsing )
 {
@@ -98,9 +98,9 @@ CSSParser::CSSParser( bool strictParsing )
     numParsedProperties = 0;
     maxParsedProperties = 32;
 
-    data = 0;
-    valueList = 0;
-    rule = 0;
+    data = nullptr;
+    valueList = nullptr;
+    rule = nullptr;
     id = 0;
     important = false;
     nonCSSHint = false;
@@ -177,7 +177,7 @@ void CSSParser::parseSheet( CSSStyleSheetImpl *sheet, const DOMString &string )
 #endif
 
     delete rule;
-    rule = 0;
+    rule = nullptr;
 }
 
 CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOMString &string )
@@ -197,7 +197,7 @@ CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOM
     runParser(length);
 
     CSSRuleImpl *result = rule;
-    rule = 0;
+    rule = nullptr;
 
     return result;
 }
@@ -229,7 +229,7 @@ bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id,
     runParser(length);
 
     delete rule;
-    rule = 0;
+    rule = nullptr;
 
     bool ok = false;
     if ( numParsedProperties ) {
@@ -268,7 +268,7 @@ bool CSSParser::parseDeclaration( DOM::CSSStyleDeclarationImpl *declaration, con
     runParser(length);
 
     delete rule;
-    rule = 0;
+    rule = nullptr;
 
     bool ok = false;
     if ( numParsedProperties ) {
@@ -320,7 +320,7 @@ void CSSParser::clearProperties()
 DOM::DocumentImpl *CSSParser::document() const
 {
     const StyleBaseImpl* root = styleElement;
-    DocumentImpl *doc = 0;
+    DocumentImpl *doc = nullptr;
     while (root->parent())
         root = root->parent();
     if (root->isCSSStyleSheet())
@@ -416,7 +416,7 @@ bool CSSParser::parseValue( int propId, bool important )
     }
 
     bool valid_primitive = false;
-    CSSValueImpl *parsedValue = 0;
+    CSSValueImpl *parsedValue = nullptr;
 
     switch(propId) {
         /* The comment to the left defines all valid value of this properties as defined
@@ -715,7 +715,7 @@ bool CSSParser::parseValue( int propId, bool important )
     case CSS_PROP_BACKGROUND_POSITION_Y:
     case CSS_PROP__TDEHTML_BACKGROUND_SIZE:
     case CSS_PROP_BACKGROUND_REPEAT: {
-        CSSValueImpl *val1 = 0, *val2 = 0;
+        CSSValueImpl *val1 = nullptr, *val2 = nullptr;
         int propId1, propId2;
         if (parseBackgroundProperty(propId, propId1, propId2, val1, val2)) {
             addProperty(propId1, val1, important);
@@ -1146,8 +1146,8 @@ bool CSSParser::parseBackgroundShorthand(bool important)
     ShorthandScope scope(this, CSS_PROP_BACKGROUND);
 
     bool parsedProperty[numProperties] = { false }; // compiler will repeat false as necessary
-    CSSValueImpl* values[numProperties] = { 0 }; // compiler will repeat 0 as necessary
-    CSSValueImpl* positionYValue = 0;
+    CSSValueImpl* values[numProperties] = { nullptr }; // compiler will repeat 0 as necessary
+    CSSValueImpl* positionYValue = nullptr;
     int i;
 
     while (valueList->current()) {
@@ -1175,7 +1175,7 @@ bool CSSParser::parseBackgroundShorthand(bool important)
         bool found = false;
         for (i = 0; !found && i < numProperties; ++i) {
             if (!parsedProperty[i]) {
-                CSSValueImpl *val1 = 0, *val2 = 0;
+                CSSValueImpl *val1 = nullptr, *val2 = nullptr;
                 int propId1, propId2;
 		if (parseBackgroundProperty(properties[i], propId1, propId2, val1, val2)) {
 		    parsedProperty[i] = found = true;
@@ -1331,9 +1331,9 @@ bool CSSParser::parseContent( int propId, bool important )
 
     bool isValid = true;
     Value *val;
-    CSSValueImpl *parsedValue = 0;
+    CSSValueImpl *parsedValue = nullptr;
     while ( (val = valueList->current()) ) {
-        parsedValue = 0;
+        parsedValue = nullptr;
         if ( val->unit == CSSPrimitiveValue::CSS_URI ) {
             // url
             DOMString value = tdehtml::parseURL(domString(val->string));
@@ -1407,7 +1407,7 @@ CSSValueImpl* CSSParser::parseCounterContent(ValueList *args, bool counters)
 {
     if (counters || (args->size() != 1 && args->size() != 3))
         if (!counters || (args->size() != 3 && args->size() != 5))
-            return 0;
+            return nullptr;
 
     CounterImpl *counter = new CounterImpl;
     Value *i = args->current();
@@ -1433,7 +1433,7 @@ CSSValueImpl* CSSParser::parseCounterContent(ValueList *args, bool counters)
     return new CSSPrimitiveValueImpl(counter);
 invalid:
     delete counter;
-    return 0;
+    return nullptr;
 }
 
 CSSValueImpl* CSSParser::parseBackgroundColor()
@@ -1456,7 +1456,7 @@ CSSValueImpl* CSSParser::parseBackgroundImage()
             return new CSSImageValueImpl(DOMString(KURL(styleElement->baseURL(), uri.string()).url()),
                                          styleElement);
     }
-    return 0;
+    return nullptr;
 }
 
 CSSValueImpl* CSSParser::parseBackgroundPositionXY(bool& xFound, bool& yFound)
@@ -1466,14 +1466,14 @@ CSSValueImpl* CSSParser::parseBackgroundPositionXY(bool& xFound, bool& yFound)
         int percent = 0;
         if (id == CSS_VAL_LEFT || id == CSS_VAL_RIGHT) {
             if (xFound)
-                return 0;
+                return nullptr;
             xFound = true;
             if (id == CSS_VAL_RIGHT)
                 percent = 100;
         }
         else if (id == CSS_VAL_TOP || id == CSS_VAL_BOTTOM) {
             if (yFound)
-                return 0;
+                return nullptr;
             yFound = true;
             if (id == CSS_VAL_BOTTOM)
                 percent = 100;
@@ -1487,12 +1487,12 @@ CSSValueImpl* CSSParser::parseBackgroundPositionXY(bool& xFound, bool& yFound)
         return new CSSPrimitiveValueImpl(valueList->current()->fValue,
                                          (CSSPrimitiveValue::UnitTypes)valueList->current()->unit);
 
-    return 0;
+    return nullptr;
 }
 
 void CSSParser::parseBackgroundPosition(CSSValueImpl*& value1, CSSValueImpl*& value2)
 {
-    value1 = value2 = 0;
+    value1 = value2 = nullptr;
     Value* value = valueList->current();
 
     // Parse the first value.  We're just making sure that it is one of the valid keywords or a percentage/length.
@@ -1508,7 +1508,7 @@ void CSSParser::parseBackgroundPosition(CSSValueImpl*& value1, CSSValueImpl*& va
 
     // First check for the comma.  If so, we are finished parsing this value or value pair.
     if (value && value->unit == Value::Operator && value->iValue == ',')
-        value = 0;
+        value = nullptr;
 
     bool value2IsX = false, value2IsY = false;
     if (value) {
@@ -1518,7 +1518,7 @@ void CSSParser::parseBackgroundPosition(CSSValueImpl*& value1, CSSValueImpl*& va
         else {
             if (!inShorthand()) {
                 delete value1;
-                value1 = 0;
+                value1 = nullptr;
                 return;
             }
         }
@@ -1548,7 +1548,7 @@ CSSValueImpl* CSSParser::parseBackgroundSize()
         parsedValue1 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN);
     else {
         if (!validUnit(value, FLength|FPercent, strict))
-            return 0;
+            return nullptr;
         parsedValue1 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
     }
 
@@ -1559,7 +1559,7 @@ CSSValueImpl* CSSParser::parseBackgroundSize()
         else {
             if (!validUnit(value, FLength|FPercent, strict)) {
                 delete parsedValue1;
-                return 0;
+                return nullptr;
             }
             parsedValue2 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
         }
@@ -1576,12 +1576,12 @@ bool CSSParser::parseBackgroundProperty(int propId, int& propId1, int& propId2,
     kdDebug(6080) << "parseBackgroundProperty()" << endl;
     kdDebug(6080) << "LOOKING FOR: " << getPropertyName(propId).string() << endl;
 #endif
-    CSSValueListImpl *values = 0, *values2 = 0;
+    CSSValueListImpl *values = nullptr, *values2 = nullptr;
     Value* val;
-    CSSValueImpl *value = 0, *value2 = 0;
+    CSSValueImpl *value = nullptr, *value2 = nullptr;
     bool allowComma = false;
 
-    retValue1 = retValue2 = 0;
+    retValue1 = retValue2 = nullptr;
     propId1 = propId;
     propId2 = propId;
     if (propId == CSS_PROP_BACKGROUND_POSITION) {
@@ -1590,7 +1590,7 @@ bool CSSParser::parseBackgroundProperty(int propId, int& propId1, int& propId2,
     }
 
     while ((val = valueList->current())) {
-        CSSValueImpl *currValue = 0, *currValue2 = 0;
+        CSSValueImpl *currValue = nullptr, *currValue2 = nullptr;
         if (allowComma) {
             if (val->unit != Value::Operator || val->iValue != ',')
                 goto failed;
@@ -1659,13 +1659,13 @@ bool CSSParser::parseBackgroundProperty(int propId, int& propId1, int& propId2,
             if (value && !values) {
                 values = new CSSValueListImpl();
                 values->append(value);
-                value = 0;
+                value = nullptr;
             }
 
             if (value2 && !values2) {
                 values2 = new CSSValueListImpl();
                 values2->append(value2);
-                value2 = 0;
+                value2 = nullptr;
             }
 
             if (values)
@@ -1761,8 +1761,8 @@ bool CSSParser::parseFont( bool important )
 //     kdDebug(6080) << "parsing font property current=" << valueList->currentValue << endl;
     bool valid = true;
     Value *value = valueList->current();
-    CSSValueListImpl* family = 0;
-    CSSPrimitiveValueImpl *style = 0, *variant = 0, *weight = 0, *size = 0, *lineHeight = 0;
+    CSSValueListImpl* family = nullptr;
+    CSSPrimitiveValueImpl *style = nullptr, *variant = nullptr, *weight = nullptr, *size = nullptr, *lineHeight = nullptr;
     // optional font-style, font-variant and font-weight
     while ( value ) {
 //         kdDebug( 6080 ) << "got value " << value->id << " / " << (value->unit == CSSPrimitiveValue::CSS_STRING ||
@@ -1983,7 +1983,7 @@ CSSValueListImpl *CSSParser::parseFontFamily()
 
     if ( !list->length() ) {
         delete list;
-        list = 0;
+        list = nullptr;
     }
     return list;
 }
@@ -2107,55 +2107,55 @@ CSSPrimitiveValueImpl *CSSParser::parseColorFromValue(Value* value)
         TQString str;
         str.sprintf( "%06d", (int)(value->fValue+.5) );
         if ( !::parseColor( value->unit, str, c ) )
-            return 0;
+            return nullptr;
     }
     else if (value->unit == CSSPrimitiveValue::CSS_RGBCOLOR ||
              value->unit == CSSPrimitiveValue::CSS_IDENT ||
              (!strict && value->unit == CSSPrimitiveValue::CSS_DIMENSION)) {
         if ( !::parseColor( value->unit, qString( value->string ), c) )
-            return 0;
+            return nullptr;
     }
     else if ( value->unit == Value::Function &&
-		value->function->args != 0 &&
+		value->function->args != nullptr &&
                 value->function->args->size() == 5 /* rgb + two commas */ &&
                 qString( value->function->name ).lower() == "rgb(" ) {
         int colorValues[3];
         if (!parseColorParameters(value, colorValues, false))
-            return 0;
+            return nullptr;
         colorValues[0] = kMax( 0, kMin( 255, colorValues[0] ) );
         colorValues[1] = kMax( 0, kMin( 255, colorValues[1] ) );
         colorValues[2] = kMax( 0, kMin( 255, colorValues[2] ) );
         c = tqRgb(colorValues[0], colorValues[1], colorValues[2]);
     } else if (value->unit == Value::Function &&
-                value->function->args != 0 &&
+                value->function->args != nullptr &&
                 value->function->args->size() == 7 /* rgba + three commas */ &&
                 domString(value->function->name).lower() == "rgba(") {
         int colorValues[4];
         if (!parseColorParameters(value, colorValues, true))
-            return 0;
+            return nullptr;
         colorValues[0] = kMax( 0, kMin( 255, colorValues[0] ) );
         colorValues[1] = kMax( 0, kMin( 255, colorValues[1] ) );
         colorValues[2] = kMax( 0, kMin( 255, colorValues[2] ) );
         c = tqRgba(colorValues[0], colorValues[1], colorValues[2], colorValues[3]);
     } else if (value->unit == Value::Function &&
-                value->function->args != 0 &&
+                value->function->args != nullptr &&
                 value->function->args->size() == 5 /* hsl + two commas */ &&
                 domString(value->function->name).lower() == "hsl(") {
         double colorValues[3];
         if (!parseHSLParameters(value, colorValues, false))
-            return 0;
+            return nullptr;
         c = tdehtml::tqRgbaFromHsla(colorValues[0], colorValues[1], colorValues[2], 1.0);
     } else if (value->unit == Value::Function &&
-                value->function->args != 0 &&
+                value->function->args != nullptr &&
                 value->function->args->size() == 7 /* hsla + three commas */ &&
                 domString(value->function->name).lower() == "hsla(") {
         double colorValues[4];
         if (!parseHSLParameters(value, colorValues, true))
-            return 0;
+            return nullptr;
         c = tdehtml::tqRgbaFromHsla(colorValues[0], colorValues[1], colorValues[2], colorValues[3]);
     }
     else
-        return 0;
+        return nullptr;
 
     return new CSSPrimitiveValueImpl(c);
 }
@@ -2164,7 +2164,7 @@ CSSPrimitiveValueImpl *CSSParser::parseColorFromValue(Value* value)
 // without the allowBreak bit being set, then it will clean up all of the objects and destroy them.
 struct ShadowParseContext {
     ShadowParseContext()
-    :values(0), x(0), y(0), blur(0), color(0),
+    :values(nullptr), x(nullptr), y(nullptr), blur(nullptr), color(nullptr),
      allowX(true), allowY(false), allowBlur(false), allowColor(true),
      allowBreak(true)
     {}
@@ -2194,7 +2194,7 @@ struct ShadowParseContext {
         }
 
         // Now reset for the next shadow value.
-        x = y = blur = color = 0;
+        x = y = blur = color = nullptr;
         allowX = allowColor = allowBreak = true;
         allowY = allowBlur = false;
     }
@@ -2266,7 +2266,7 @@ bool CSSParser::parseShadow(int propId, bool important)
         }
         else {
             // The only other type of value that's ok is a color value.
-            CSSPrimitiveValueImpl* parsedColor = 0;
+            CSSPrimitiveValueImpl* parsedColor = nullptr;
             bool isColor = (val->id >= CSS_VAL_AQUA && val->id <= CSS_VAL_WINDOWTEXT || val->id == CSS_VAL_MENU ||
                            (val->id >= CSS_VAL_GREY && val->id <= CSS_VAL__TDEHTML_TEXT && !strict));
 	    if (!context.allowColor)
@@ -2505,7 +2505,7 @@ unsigned short *DOM::CSSParser::text(int *length)
 
     // process escapes
     unsigned short *out = start;
-    unsigned short *escape = 0;
+    unsigned short *escape = nullptr;
 
     for ( int i = 0; i < l; i++ ) {
         unsigned short *current = start+i;
@@ -2518,18 +2518,18 @@ unsigned short *DOM::CSSParser::text(int *length)
                  ( *current == '\n' || *current == '\r' || *current == '\f' ) ) {
                 // ### handle \r\n case
                 if ( *current != '\r' )
-                    escape = 0;
+                    escape = nullptr;
                 continue;
             }
             // in all other cases copy the char to output
             // ###
             *out++ = *current;
-            escape = 0;
+            escape = nullptr;
             continue;
         }
         if ( escape == current - 2 && yyTok == STRING &&
              *(current-1) == '\r' && *current == '\n' ) {
-            escape = 0;
+            escape = nullptr;
             continue;
         }
         if ( escape > current - 7 &&
@@ -2552,7 +2552,7 @@ unsigned short *DOM::CSSParser::text(int *length)
             if ( uc > 0xffff )
                 uc = 0xfffd;
             *(out++) = (unsigned short)uc;
-            escape = 0;
+            escape = nullptr;
             if ( *current == ' ' ||
                  *current == '\t' ||
                  *current == '\r' ||
diff --git a/tdehtml/css/cssparser.h b/tdehtml/css/cssparser.h
index de735fe3e..485e76387 100644
--- a/tdehtml/css/cssparser.h
+++ b/tdehtml/css/cssparser.h
@@ -85,7 +85,7 @@ namespace DOM {
 	~ValueList();
         void addValue(const Value& v) { m_values.append(v); }
         unsigned int size() const { return m_values.size(); }
-        Value* current() { return m_current < m_values.size() ? &m_values[m_current] : 0; }
+        Value* current() { return m_current < m_values.size() ? &m_values[m_current] : nullptr; }
         Value* next() { ++m_current; return current(); }
     private:
         TQValueVector<Value> m_values;
diff --git a/tdehtml/css/cssstyleselector.cpp b/tdehtml/css/cssstyleselector.cpp
index 82d7d6604..730b4b26c 100644
--- a/tdehtml/css/cssstyleselector.cpp
+++ b/tdehtml/css/cssstyleselector.cpp
@@ -95,7 +95,7 @@ else if (isInitial) \
 #define HANDLE_BACKGROUND_INHERIT_AND_INITIAL(prop, Prop) \
 if (isInherit) { \
     BackgroundLayer* currChild = style->accessBackgroundLayers(); \
-    BackgroundLayer* prevChild = 0; \
+    BackgroundLayer* prevChild = nullptr; \
     const BackgroundLayer* currParent = parentStyle->backgroundLayers(); \
     while (currParent && currParent->is##Prop##Set()) { \
         if (!currChild) { \
@@ -129,7 +129,7 @@ HANDLE_BACKGROUND_INHERIT_AND_INITIAL(prop, Prop) \
 if (!value->isPrimitiveValue() && !value->isValueList()) \
     return; \
 BackgroundLayer* currChild = style->accessBackgroundLayers(); \
-BackgroundLayer* prevChild = 0; \
+BackgroundLayer* prevChild = nullptr; \
 if (value->isPrimitiveValue()) { \
     map##Prop(currChild, value); \
     currChild = currChild->next(); \
@@ -213,16 +213,16 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet,
 {
     TDEHTMLView* view = doc->view();
 
-    init(view ? view->part()->settings() : 0, doc);
+    init(view ? view->part()->settings() : nullptr, doc);
 
     strictParsing = _strictParsing;
     m_medium = view ? view->mediaType() : TQString("all");
 
-    selectors = 0;
-    selectorCache = 0;
-    properties = 0;
-    userStyle = 0;
-    userSheet = 0;
+    selectors = nullptr;
+    selectorCache = nullptr;
+    properties = nullptr;
+    userStyle = nullptr;
+    userSheet = nullptr;
     paintDeviceMetrics = doc->paintDeviceMetrics();
 
     if(paintDeviceMetrics) // this may be null, not everyone uses tdehtmlview (Niko)
@@ -271,7 +271,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet,
 
 CSSStyleSelector::CSSStyleSelector( CSSStyleSheetImpl *sheet )
 {
-    init(0L, 0L);
+    init(nullptr, nullptr);
 
     TDEHTMLView *view = sheet->doc()->view();
     m_medium = view ? view->mediaType() : "screen";
@@ -282,9 +282,9 @@ CSSStyleSelector::CSSStyleSelector( CSSStyleSheetImpl *sheet )
 
 void CSSStyleSelector::init(const TDEHTMLSettings* _settings, DocumentImpl* doc)
 {
-    element = 0;
+    element = nullptr;
     settings = _settings;
-    paintDeviceMetrics = 0;
+    paintDeviceMetrics = nullptr;
     propsToApply = (CSSOrderedProperty **)malloc(128*sizeof(CSSOrderedProperty *));
     pseudoProps = (CSSOrderedProperty **)malloc(128*sizeof(CSSOrderedProperty *));
     propsToApplySize = 128;
@@ -373,20 +373,20 @@ void CSSStyleSelector::clear()
     delete s_defaultPrintStyle;
     delete s_defaultSheet;
     delete styleNotYetAvailable;
-    s_defaultStyle = 0;
-    s_defaultQuirksStyle = 0;
-    s_defaultPrintStyle = 0;
-    s_defaultSheet = 0;
-    styleNotYetAvailable = 0;
+    s_defaultStyle = nullptr;
+    s_defaultQuirksStyle = nullptr;
+    s_defaultPrintStyle = nullptr;
+    s_defaultSheet = nullptr;
+    styleNotYetAvailable = nullptr;
 }
 
 void CSSStyleSelector::reparseConfiguration()
 {
     // nice leak, but best we can do right now. hopefully its only rare.
-    s_defaultStyle = 0;
-    s_defaultQuirksStyle = 0;
-    s_defaultPrintStyle = 0;
-    s_defaultSheet = 0;
+    s_defaultStyle = nullptr;
+    s_defaultQuirksStyle = nullptr;
+    s_defaultPrintStyle = nullptr;
+    s_defaultSheet = nullptr;
 }
 
 #define MAXFONTSIZES 8
@@ -446,7 +446,7 @@ static inline void bubbleSort( CSSOrderedProperty **b, CSSOrderedProperty **e )
 	bool swapped = false;
         CSSOrderedProperty **y = e+1;
 	CSSOrderedProperty **x = e;
-        CSSOrderedProperty **swappedPos = 0;
+        CSSOrderedProperty **swappedPos = nullptr;
 	do {
 	    if ( !((**(--x)) < (**(--y))) ) {
 		swapped = true;
@@ -477,7 +477,7 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
 
     element = e;
     parentNode = e->parentNode();
-    parentStyle = ( parentNode && parentNode->renderer()) ? parentNode->renderer()->style() : 0;
+    parentStyle = ( parentNode && parentNode->renderer()) ? parentNode->renderer()->style() : nullptr;
     view = element->getDocument()->view();
     part = view->part();
     settings = part->settings();
@@ -630,7 +630,7 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
     // Now adjust all our pseudo-styles.
     RenderStyle *pseudoStyle = style->pseudoStyle;
     while (pseudoStyle) {
-        adjustRenderStyle(pseudoStyle, 0);
+        adjustRenderStyle(pseudoStyle, nullptr);
         pseudoStyle = pseudoStyle->pseudoStyle;
     }
 
@@ -752,7 +752,7 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e,
                                                      DOM::CSSStyleDeclarationImpl *decl,
                                                      unsigned int numProps)
 {
-    CSSStyleDeclarationImpl* addDecls = 0;
+    CSSStyleDeclarationImpl* addDecls = nullptr;
 #ifdef APPLE_CHANGES
     if (e->id() == ID_TD || e->id() == ID_TH)     // For now only TableCellElement implements the
         addDecls = e->getAdditionalStyleDecls();  // virtual function for shared cell rules.
@@ -763,8 +763,8 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e,
     if (!decl && !addDecls)
         return numProps;
 
-    TQPtrList<CSSProperty>* values = decl ? decl->values() : 0;
-    TQPtrList<CSSProperty>* addValues = addDecls ? addDecls->values() : 0;
+    TQPtrList<CSSProperty>* values = decl ? decl->values() : nullptr;
+    TQPtrList<CSSProperty>* addValues = addDecls ? addDecls->values() : nullptr;
     if (!values && !addValues)
         return numProps;
 
@@ -1245,7 +1245,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm
 
                 while (t && t->isTextNode() && static_cast<TextImpl*>(t)->length() == 0) t = t->nextSibling();
 
-                if (t == 0)
+                if (!t)
                     return true;
                 else
                     return false;
@@ -1651,9 +1651,9 @@ void CSSStyleSelector::clearLists()
 	}
         delete [] properties;
     }
-    selectors = 0;
-    properties = 0;
-    selectorCache = 0;
+    selectors = nullptr;
+    properties = nullptr;
+    selectorCache = nullptr;
 }
 
 
@@ -1691,7 +1691,7 @@ void CSSStyleSelector::buildLists()
     for ( unsigned int i = 0; i < selectors_size; i++ ) {
         selectorCache[i].state = Unknown;
         selectorCache[i].props_size = 0;
-        selectorCache[i].props = 0;
+        selectorCache[i].props = nullptr;
     }
 
     // presort properties. Should make the sort() calls in styleForElement faster.
@@ -1705,7 +1705,7 @@ void CSSStyleSelector::buildLists()
 	p = propertyList.next();
 	++prop;
     }
-    *prop = 0;
+    *prop = nullptr;
 
     unsigned int* offsets = new unsigned int[selectors_size];
     if(properties[0])
@@ -1927,7 +1927,7 @@ void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint sel
 // -------------------------------------------------------------------------------------
 // this is mostly boring stuff on how to apply a certain rule to the renderstyle...
 
-static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, TQPaintDeviceMetrics *paintDeviceMetrics, bool *ok = 0 )
+static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, TQPaintDeviceMetrics *paintDeviceMetrics, bool *ok = nullptr )
 {
     Length l;
     if ( !primitiveValue ) {
@@ -2004,23 +2004,23 @@ static const uiColors uimap[] = {
         // Text in caption, size box, and scrollbar arrow box.
     { CSS_VAL_CAPTIONTEXT, wmgroup, "activeForeground", TQPalette::Active, TQColorGroup::Text },
 	// Face color for three-dimensional display elements.
-    { CSS_VAL_BUTTONFACE, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Button },
+    { CSS_VAL_BUTTONFACE, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Button },
 	// Dark shadow for three-dimensional display elements (for edges facing away from the light source).
-    { CSS_VAL_BUTTONHIGHLIGHT, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Light },
+    { CSS_VAL_BUTTONHIGHLIGHT, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Light },
 	// Shadow color for three-dimensional display elements.
-    { CSS_VAL_BUTTONSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Shadow },
+    { CSS_VAL_BUTTONSHADOW, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Shadow },
 	// Text on push buttons.
     { CSS_VAL_BUTTONTEXT, wmgroup, "buttonForeground", TQPalette::Inactive, TQColorGroup::ButtonText },
 	// Dark shadow for three-dimensional display elements.
-    { CSS_VAL_THREEDDARKSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Dark },
+    { CSS_VAL_THREEDDARKSHADOW, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Dark },
 	// Face color for three-dimensional display elements.
-    { CSS_VAL_THREEDFACE, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Button },
+    { CSS_VAL_THREEDFACE, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Button },
 	// Highlight color for three-dimensional display elements.
-    { CSS_VAL_THREEDHIGHLIGHT, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Light },
+    { CSS_VAL_THREEDHIGHLIGHT, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Light },
 	// Light color for three-dimensional display elements (for edges facing the light source).
-    { CSS_VAL_THREEDLIGHTSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Midlight },
+    { CSS_VAL_THREEDLIGHTSHADOW, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Midlight },
 	// Dark shadow for three-dimensional display elements.
-    { CSS_VAL_THREEDSHADOW, wmgroup, 0, TQPalette::Inactive, TQColorGroup::Shadow },
+    { CSS_VAL_THREEDSHADOW, wmgroup, nullptr, TQPalette::Inactive, TQColorGroup::Shadow },
 
     // Inactive window border.
     { CSS_VAL_INACTIVEBORDER, wmgroup, "background", TQPalette::Disabled, TQColorGroup::Background },
@@ -2028,7 +2028,7 @@ static const uiColors uimap[] = {
     { CSS_VAL_INACTIVECAPTION, wmgroup, "inactiveBackground", TQPalette::Disabled, TQColorGroup::Background },
     // Color of text in an inactive caption.
     { CSS_VAL_INACTIVECAPTIONTEXT, wmgroup, "inactiveForeground", TQPalette::Disabled, TQColorGroup::Text },
-    { CSS_VAL_GRAYTEXT, wmgroup, 0, TQPalette::Disabled, TQColorGroup::Text },
+    { CSS_VAL_GRAYTEXT, wmgroup, nullptr, TQPalette::Disabled, TQColorGroup::Text },
 
 	// Menu background
     { CSS_VAL_MENU, generalgroup, "background", TQPalette::Inactive, TQColorGroup::Background },
@@ -2053,8 +2053,8 @@ static const uiColors uimap[] = {
     { CSS_VAL_WINDOWFRAME, generalgroup, "windowBackground", TQPalette::Inactive, TQColorGroup::Background },
         // WindowText
     { CSS_VAL_WINDOWTEXT, generalgroup, "windowForeground", TQPalette::Inactive, TQColorGroup::Text },
-    { CSS_VAL_TEXT, generalgroup, 0, TQPalette::Inactive, TQColorGroup::Text },
-    { 0, 0, 0, TQPalette::NColorGroups, TQColorGroup::NColorRoles }
+    { CSS_VAL_TEXT, generalgroup, nullptr, TQPalette::Inactive, TQColorGroup::Text },
+    { 0, nullptr, nullptr, TQPalette::NColorGroups, TQColorGroup::NColorRoles }
 };
 
 static TQColor colorForCSSValue( int css_value )
@@ -2125,7 +2125,7 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
 {
 //     kdDebug( 6080 ) << "applying property " << getPropertyName(id) << endl;
 
-    CSSPrimitiveValueImpl *primitiveValue = 0;
+    CSSPrimitiveValueImpl *primitiveValue = nullptr;
     if(value->isPrimitiveValue()) primitiveValue = static_cast<CSSPrimitiveValueImpl *>(value);
 
     Length l;
@@ -3799,16 +3799,16 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
     }
     case CSS_PROP_TEXT_SHADOW: {
         if (isInherit) {
-            style->setTextShadow(parentStyle->textShadow() ? new ShadowData(*parentStyle->textShadow()) : 0);
+            style->setTextShadow(parentStyle->textShadow() ? new ShadowData(*parentStyle->textShadow()) : nullptr);
             return;
         }
         else if (isInitial) {
-            style->setTextShadow(0);
+            style->setTextShadow(nullptr);
             return;
         }
 
         if (primitiveValue) { // none
-            style->setTextShadow(0);
+            style->setTextShadow(nullptr);
             return;
         }
 
diff --git a/tdehtml/css/parser.y b/tdehtml/css/parser.y
index 236b467dd..9946a9cc7 100644
--- a/tdehtml/css/parser.y
+++ b/tdehtml/css/parser.y
@@ -125,11 +125,11 @@ static int cssyylex( YYSTYPE *yylval ) {
 
 %}
 
-%destructor { delete $$; $$ = 0; } expr;
-%destructor { delete $$; $$ = 0; } maybe_media_list media_list;
-%destructor { delete $$; $$ = 0; } selector_list;
-%destructor { delete $$; $$ = 0; } ruleset_list;
-%destructor { delete $$; $$ = 0; } specifier specifier_list simple_selector selector class attrib pseudo;
+%destructor { delete $$; $$ = nullptr; } expr;
+%destructor { delete $$; $$ = nullptr; } maybe_media_list media_list;
+%destructor { delete $$; $$ = nullptr; } selector_list;
+%destructor { delete $$; $$ = nullptr; } ruleset_list;
+%destructor { delete $$; $$ = nullptr; } specifier specifier_list simple_selector selector class attrib pseudo;
 
 %no-lines
 %verbose
@@ -294,7 +294,7 @@ tdehtml_value:
 	    kdDebug( 6080 ) << "     no value found!" << endl;
 #endif
 	delete p->valueList;
-	p->valueList = 0;
+	p->valueList = nullptr;
     }
 ;
 
@@ -341,13 +341,13 @@ import:
 	if ( $5 && p->styleElement && p->styleElement->isCSSStyleSheet() )
 	    $$ = new CSSImportRuleImpl( p->styleElement, domString($3), $5 );
 	else
-	    $$ = 0;
+	    $$ = nullptr;
     }
   | IMPORT_SYM error invalid_block {
-        $$ = 0;
+        $$ = nullptr;
     }
   | IMPORT_SYM error ';' {
-        $$ = 0;
+        $$ = nullptr;
     }
   ;
 
@@ -370,7 +370,7 @@ NAMESPACE_SYM maybe_space maybe_ns_prefix string_or_uri maybe_space ';' {
     ;
 
 maybe_ns_prefix:
-/* empty */ { $$.string = 0; }
+/* empty */ { $$.string = nullptr; }
 | IDENT S { $$ = $1; }
   ;
 
@@ -393,7 +393,7 @@ rule:
   | font_face
   | invalid_rule
   | invalid_at
-  | import error { delete $1; $$ = 0; }
+  | import error { delete $1; $$ = nullptr; }
     ;
 
 string_or_uri:
@@ -421,7 +421,7 @@ media_list:
     }
     | media_list error {
        delete $1;
-       $$ = 0;
+       $$ = nullptr;
     }
     ;
 
@@ -432,7 +432,7 @@ media:
 	     p->styleElement && p->styleElement->isCSSStyleSheet() ) {
 	    $$ = new CSSMediaRuleImpl( static_cast<CSSStyleSheetImpl*>(p->styleElement), $3, $6 );
 	} else {
-	    $$ = 0;
+	    $$ = nullptr;
 	    delete $3;
 	    delete $6;
 	}
@@ -440,7 +440,7 @@ media:
   ;
 
 ruleset_list:
-    /* empty */ { $$ = 0; }
+    /* empty */ { $$ = nullptr; }
   | ruleset_list ruleset maybe_space {
       $$ = $1;
       if ( $2 ) {
@@ -474,19 +474,19 @@ font_face
 
 page:
     PAGE_SYM error invalid_block {
-      $$ = 0;
+      $$ = nullptr;
     }
   | PAGE_SYM error ';' {
-      $$ = 0;
+      $$ = nullptr;
     }
     ;
 
 font_face:
     FONT_FACE_SYM error invalid_block {
-      $$ = 0;
+      $$ = nullptr;
     }
   | FONT_FACE_SYM error ';' {
-      $$ = 0;
+      $$ = nullptr;
     }
 ;
 
@@ -515,7 +515,7 @@ ruleset:
 	    rule->setDeclaration(decl);
 	    $$ = rule;
 	} else {
-	    $$ = 0;
+	    $$ = nullptr;
 	    delete $1;
 	    p->clearProperties();
 	}
@@ -534,7 +534,7 @@ selector_list:
 	    $$->append( $1 );
 	    tdehtml::CSSStyleSelector::precomputeAttributeDependencies(static_cast<CSSParser *>(parser)->document(), $1);
 	} else {
-	    $$ = 0;
+	    $$ = nullptr;
 	}
     }
     | selector_list ',' maybe_space selector %prec UNIMPORTANT_TOK {
@@ -549,12 +549,12 @@ selector_list:
 	} else {
 	    delete $1;
 	    delete $4;
-	    $$ = 0;
+	    $$ = nullptr;
 	}
     }
   | selector_list error {
 	delete $1;
-	$$ = 0;
+	$$ = nullptr;
     }
    ;
 
@@ -566,7 +566,7 @@ selector:
 	if ( !$1 || !$3 ) {
 	    delete $1;
 	    delete $3;
-	    $$ = 0;
+	    $$ = nullptr;
 	} else {
 	    $$ = $3;
 	    CSSSelector *end = $3;
@@ -578,12 +578,12 @@ selector:
     }
     | selector error {
 	delete $1;
-	$$ = 0;
+	$$ = nullptr;
     }
     ;
 
 namespace_selector:
-    /* empty */ '|' { $$.string = 0; $$.length = 0; }
+    /* empty */ '|' { $$.string = nullptr; $$.length = 0; }
     | '*' '|' { static unsigned short star = '*'; $$.string = &star; $$.length = 1; }
     | IDENT '|' { $$ = $1; }
 ;
@@ -669,7 +669,7 @@ specifier_list:
     }
     | specifier_list error {
 	delete $1;
-	$$ = 0;
+	$$ = nullptr;
     }
 ;
 
@@ -883,7 +883,7 @@ declaration:
             delete $4;
         }
 	delete p->valueList;
-	p->valueList = 0;
+	p->valueList = nullptr;
     }
     | error invalid_block {
         $$ = false;
@@ -930,7 +930,7 @@ operator:
 	$$ = ',';
     }
   | /* empty */ {
-        $$ = 0;
+        $$ = nullptr;
   }
   ;
 
@@ -990,7 +990,7 @@ function:
   | FUNCTION maybe_space error {
       Function *f = new Function;
       f->name = $1;
-      f->args = 0;
+      f->args = nullptr;
       $$.id = 0;
       $$.unit = Value::Function;
       $$.function = f;
@@ -1011,13 +1011,13 @@ hexcolor:
 
 invalid_at:
     '@' error invalid_block {
-	$$ = 0;
+	$$ = nullptr;
 #ifdef CSS_DEBUG
 	kdDebug( 6080 ) << "skipped invalid @-rule" << endl;
 #endif
     }
   | '@' error ';' {
-	$$ = 0;
+	$$ = nullptr;
 #ifdef CSS_DEBUG
 	kdDebug( 6080 ) << "skipped invalid @-rule" << endl;
 #endif
@@ -1026,7 +1026,7 @@ invalid_at:
 
 invalid_rule:
     error invalid_block {
-	$$ = 0;
+	$$ = nullptr;
 #ifdef CSS_DEBUG
 	kdDebug( 6080 ) << "skipped invalid rule" << endl;
 #endif
@@ -1036,13 +1036,13 @@ invalid_rule:
   http://www.hixie.ch/tests/evil/mixed/csserrorhandling.html
 
   | error ';' {
-	$$ = 0;
+	$$ = nullptr;
 #ifdef CSS_DEBUG
 	kdDebug( 6080 ) << "skipped invalid rule" << endl;
 #endif
     }
   | error '}' {
-	$$ = 0;
+	$$ = nullptr;
 #ifdef CSS_DEBUG
 	kdDebug( 6080 ) << "skipped invalid rule" << endl;
 #endif
diff --git a/tdehtml/dom/css_rule.cpp b/tdehtml/dom/css_rule.cpp
index e73ff493a..7166a33fb 100644
--- a/tdehtml/dom/css_rule.cpp
+++ b/tdehtml/dom/css_rule.cpp
@@ -26,7 +26,7 @@ using namespace DOM;
 
 CSSRule::CSSRule()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 CSSRule::CSSRule(const CSSRule &other)
@@ -82,7 +82,7 @@ CSSStyleSheet CSSRule::parentStyleSheet() const
 
 CSSRule CSSRule::parentRule() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((CSSRuleImpl *)impl)->parentRule();
 }
 
@@ -93,14 +93,14 @@ CSSRuleImpl *CSSRule::handle() const
 
 bool CSSRule::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 void CSSRule::assignOther( const CSSRule &other, RuleType thisType )
 {
     if (other.type() != thisType ) {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else
 	CSSRule::operator = ( other );
 }
@@ -119,7 +119,7 @@ CSSCharsetRule::CSSCharsetRule(const CSSCharsetRule &other) : CSSRule(other)
 
 CSSCharsetRule::CSSCharsetRule(const CSSRule &other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -168,7 +168,7 @@ CSSFontFaceRule::CSSFontFaceRule(const CSSFontFaceRule &other) : CSSRule(other)
 
 CSSFontFaceRule::CSSFontFaceRule(const CSSRule &other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -212,7 +212,7 @@ CSSImportRule::CSSImportRule(const CSSImportRule &other) : CSSRule(other)
 
 CSSImportRule::CSSImportRule(const CSSRule &other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -268,7 +268,7 @@ CSSMediaRule::CSSMediaRule(const CSSMediaRule &other) : CSSRule(other)
 
 CSSMediaRule::CSSMediaRule(const CSSRule &other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -330,7 +330,7 @@ CSSPageRule::CSSPageRule(const CSSPageRule &other) : CSSRule(other)
 
 CSSPageRule::CSSPageRule(const CSSRule &other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -385,7 +385,7 @@ CSSStyleRule::CSSStyleRule(const CSSStyleRule &other)
 
 CSSStyleRule::CSSStyleRule(const CSSRule &other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -443,7 +443,7 @@ CSSUnknownRule::CSSUnknownRule(const CSSUnknownRule &other)
 
 CSSUnknownRule::CSSUnknownRule(const CSSRule &other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -473,7 +473,7 @@ CSSUnknownRule::~CSSUnknownRule()
 
 CSSRuleList::CSSRuleList()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 CSSRuleList::CSSRuleList(const CSSRuleList &other)
@@ -538,7 +538,7 @@ CSSRuleListImpl *CSSRuleList::handle() const
 
 bool CSSRuleList::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 
diff --git a/tdehtml/dom/css_stylesheet.cpp b/tdehtml/dom/css_stylesheet.cpp
index ab5ce1451..03ce94731 100644
--- a/tdehtml/dom/css_stylesheet.cpp
+++ b/tdehtml/dom/css_stylesheet.cpp
@@ -38,7 +38,7 @@ using namespace DOM;
 
 StyleSheet::StyleSheet()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 StyleSheet::StyleSheet(const StyleSheet &other)
@@ -94,7 +94,7 @@ DOM::Node StyleSheet::ownerNode() const
 
 StyleSheet StyleSheet::parentStyleSheet() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((StyleSheetImpl *)impl)->parentStyleSheet();
 }
 
@@ -112,7 +112,7 @@ DOMString StyleSheet::title() const
 
 MediaList StyleSheet::media() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((StyleSheetImpl *)impl)->media();
 }
 
@@ -133,7 +133,7 @@ CSSStyleSheet::CSSStyleSheet(const CSSStyleSheet &other) : StyleSheet(other)
 CSSStyleSheet::CSSStyleSheet(const StyleSheet &other)
 {
     if (!other.isCSSStyleSheet())
-	impl = 0;
+	impl = nullptr;
     else
 	operator=(other);
 }
@@ -153,7 +153,7 @@ CSSStyleSheet &CSSStyleSheet::operator = (const StyleSheet &other)
     if(!other.handle()->isCSSStyleSheet())
     {
         if(impl) impl->deref();
-        impl = 0;
+        impl = nullptr;
     } else {
     StyleSheet::operator = (other);
     }
@@ -166,13 +166,13 @@ CSSStyleSheet::~CSSStyleSheet()
 
 CSSRule CSSStyleSheet::ownerRule() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((CSSStyleSheetImpl *)impl)->ownerRule();
 }
 
 CSSRuleList CSSStyleSheet::cssRules() const
 {
-    if(!impl) return (CSSRuleListImpl*)0;
+    if(!impl) return CSSRuleList();
     return ((CSSStyleSheetImpl *)impl)->cssRules();
 }
 
@@ -203,7 +203,7 @@ void CSSStyleSheet::deleteRule( unsigned long index )
 
 StyleSheetList::StyleSheetList()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 StyleSheetList::StyleSheetList(const StyleSheetList &other)
@@ -252,14 +252,14 @@ StyleSheetListImpl *StyleSheetList::handle() const
 
 bool StyleSheetList::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // ----------------------------------------------------------
 
 MediaList::MediaList()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 MediaList::MediaList(const MediaList &other)
@@ -332,14 +332,14 @@ MediaListImpl *MediaList::handle() const
 
 bool MediaList::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // ----------------------------------------------------------
 
 LinkStyle::LinkStyle()
 {
-    node = 0;
+    node = nullptr;
 }
 
 LinkStyle::LinkStyle(const LinkStyle &other)
@@ -361,7 +361,7 @@ LinkStyle & LinkStyle::operator = (const LinkStyle &other)
 LinkStyle & LinkStyle::operator = (const Node &other)
 {
     if(node) node->deref();
-    node = 0;
+    node = nullptr;
     // ### add processing instructions
     NodeImpl *n = other.handle();
 
@@ -393,7 +393,7 @@ StyleSheet LinkStyle::sheet()
 
 bool LinkStyle::isNull() const
 {
-    return (node == 0);
+    return (node == nullptr);
 }
 
 
@@ -401,7 +401,7 @@ bool LinkStyle::isNull() const
 
 DocumentStyle::DocumentStyle()
 {
-    doc = 0;
+    doc = nullptr;
 }
 
 DocumentStyle::DocumentStyle(const DocumentStyle &other)
diff --git a/tdehtml/dom/css_value.cpp b/tdehtml/dom/css_value.cpp
index edbf15075..157d1fe31 100644
--- a/tdehtml/dom/css_value.cpp
+++ b/tdehtml/dom/css_value.cpp
@@ -30,7 +30,7 @@ namespace DOM {
 
 CSSStyleDeclaration::CSSStyleDeclaration()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 CSSStyleDeclaration::CSSStyleDeclaration(const CSSStyleDeclaration &other)
@@ -92,9 +92,9 @@ CSSValue CSSStyleDeclaration::getPropertyCSSValue( const DOMString &propertyName
 
 CSSValue CSSStyleDeclaration::getPropertyCSSValue( const DOMString &propertyName ) const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     int id = getPropertyID(propertyName.string().ascii(), propertyName.length());
-    if (!id) return 0;
+    if (!id) return nullptr;
     return static_cast<CSSStyleDeclarationImpl *>(impl)->getPropertyCSSValue(id);
 }
 
@@ -150,7 +150,7 @@ DOMString CSSStyleDeclaration::item( unsigned long index ) const
 }
 CSSRule CSSStyleDeclaration::parentRule() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return static_cast<CSSStyleDeclarationImpl *>(impl)->parentRule();
 }
 
@@ -161,14 +161,14 @@ CSSStyleDeclarationImpl *CSSStyleDeclaration::handle() const
 
 bool CSSStyleDeclaration::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // ----------------------------------------------------------
 
 CSSValue::CSSValue()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 CSSValue::CSSValue(const CSSValue &other)
@@ -235,7 +235,7 @@ CSSValueImpl *CSSValue::handle() const
 
 bool CSSValue::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // ----------------------------------------------------------
@@ -250,7 +250,7 @@ CSSValueList::CSSValueList(const CSSValueList &other) : CSSValue(other)
 
 CSSValueList::CSSValueList(const CSSValue &other)
 {
-   impl = 0;
+   impl = nullptr;
    operator=(other);
 }
 
@@ -274,7 +274,7 @@ CSSValueList &CSSValueList::operator = (const CSSValue &other)
     if ( impl != ohandle ) {
         if (impl) impl->deref();
         if (!other.isNull() && !other.isCSSValueList()) {
-            impl = 0;
+            impl = nullptr;
 	} else {
 	    impl = ohandle;
             if (impl) impl->ref();
@@ -295,7 +295,7 @@ unsigned long CSSValueList::length() const
 
 CSSValue CSSValueList::item( unsigned long index )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((CSSValueListImpl *)impl)->item( index );
 }
 
@@ -311,7 +311,7 @@ CSSPrimitiveValue::CSSPrimitiveValue(const CSSPrimitiveValue &other) : CSSValue(
 
 CSSPrimitiveValue::CSSPrimitiveValue(const CSSValue &other) : CSSValue(other)
 {
-    impl = 0;
+    impl = nullptr;
     operator=(other);
 }
 
@@ -335,7 +335,7 @@ CSSPrimitiveValue &CSSPrimitiveValue::operator = (const CSSValue &other)
     if ( impl != ohandle ) {
         if (impl) impl->deref();
         if (!other.isNull() && !other.isCSSPrimitiveValue()) {
-            impl = 0;
+            impl = nullptr;
 	} else {
 	    impl = ohandle;
             if (impl) impl->ref();
@@ -420,7 +420,7 @@ Counter::Counter()
 
 Counter::Counter(const Counter &/*other*/)
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 Counter &Counter::operator = (const Counter &other)
@@ -469,7 +469,7 @@ CounterImpl *Counter::handle() const
 
 bool Counter::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // --------------------------------------------------------------------
@@ -518,7 +518,7 @@ CSSPrimitiveValue RGBColor::blue() const
 
 Rect::Rect()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 Rect::Rect(const Rect &other)
@@ -550,25 +550,25 @@ Rect::~Rect()
 
 CSSPrimitiveValue Rect::top() const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->top();
 }
 
 CSSPrimitiveValue Rect::right() const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->right();
 }
 
 CSSPrimitiveValue Rect::bottom() const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->bottom();
 }
 
 CSSPrimitiveValue Rect::left() const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->left();
 }
 
@@ -579,7 +579,7 @@ RectImpl *Rect::handle() const
 
 bool Rect::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 } // namespace
diff --git a/tdehtml/dom/dom2_events.cpp b/tdehtml/dom/dom2_events.cpp
index 898a73bc3..9426e967e 100644
--- a/tdehtml/dom/dom2_events.cpp
+++ b/tdehtml/dom/dom2_events.cpp
@@ -47,7 +47,7 @@ DOMString EventListener::eventListenerType()
 
 Event::Event()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 
@@ -165,7 +165,7 @@ EventImpl *Event::handle() const
 
 bool Event::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // -----------------------------------------------------------------------------
@@ -221,7 +221,7 @@ UIEvent &UIEvent::operator = (const Event &other)
     e = other;
     if (!e.isNull() && !e.handle()->isUIEvent()) {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else
 	Event::operator = (other);
     return *this;
@@ -370,7 +370,7 @@ MouseEvent &MouseEvent::operator = (const Event &other)
     e = other;
     if (!e.isNull() && !e.handle()->isMouseEvent()) {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else
 	UIEvent::operator = (other);
     return *this;
@@ -516,7 +516,7 @@ TextEvent &TextEvent::operator = (const Event &other)
     e = other;
     if (!e.isNull() && !(e.handle()->isTextInputEvent() || e.handle()->isKeyboardEvent())) {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else
 	UIEvent::operator = (other);
     return *this;
@@ -655,7 +655,7 @@ MutationEvent &MutationEvent::operator = (const Event &other)
     e = other;
     if (!e.isNull() && !e.handle()->isMutationEvent()) {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else
 	Event::operator = (other);
     return *this;
diff --git a/tdehtml/dom/dom2_range.cpp b/tdehtml/dom/dom2_range.cpp
index 87bdab145..89607bf7d 100644
--- a/tdehtml/dom/dom2_range.cpp
+++ b/tdehtml/dom/dom2_range.cpp
@@ -32,7 +32,7 @@ using namespace DOM;
 Range::Range()
 {
     // a range can't exist by itself - it must be associated with a document
-    impl = 0;
+    impl = nullptr;
 }
 
 Range::Range(const Document rootContainer)
@@ -43,7 +43,7 @@ Range::Range(const Document rootContainer)
 	impl->ref();
     }
     else
-	impl = 0;
+	impl = nullptr;
 }
 
 Range::Range(const Range &other)
@@ -387,7 +387,7 @@ RangeImpl *Range::handle() const
 
 bool Range::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 void Range::throwException(int exceptioncode) const
diff --git a/tdehtml/dom/dom2_traversal.cpp b/tdehtml/dom/dom2_traversal.cpp
index c0a09435b..552e856ab 100644
--- a/tdehtml/dom/dom2_traversal.cpp
+++ b/tdehtml/dom/dom2_traversal.cpp
@@ -29,7 +29,7 @@ using namespace DOM;
 
 NodeIterator::NodeIterator()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 NodeIterator::NodeIterator(const NodeIterator &other)
@@ -62,7 +62,7 @@ NodeIterator::~NodeIterator()
 Node NodeIterator::root()
 {
     if (impl) return impl->root();
-    return 0;
+    return nullptr;
 }
 
 unsigned long NodeIterator::whatToShow()
@@ -74,7 +74,7 @@ unsigned long NodeIterator::whatToShow()
 NodeFilter NodeIterator::filter()
 {
     if (impl) return impl->filter();
-    return 0;
+    return nullptr;
 }
 
 bool NodeIterator::expandEntityReferences()
@@ -125,14 +125,14 @@ NodeIteratorImpl *NodeIterator::handle() const
 
 bool NodeIterator::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // -----------------------------------------------------------
 
 NodeFilter::NodeFilter()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 NodeFilter::NodeFilter(const NodeFilter &other)
@@ -176,7 +176,7 @@ void NodeFilter::setCustomNodeFilter(CustomNodeFilter *custom)
 CustomNodeFilter *NodeFilter::customNodeFilter()
 {
     if (impl) return impl->customNodeFilter();
-    return 0;
+    return nullptr;
 }
 
 NodeFilterImpl *NodeFilter::handle() const
@@ -186,7 +186,7 @@ NodeFilterImpl *NodeFilter::handle() const
 
 bool NodeFilter::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 NodeFilter NodeFilter::createCustom(CustomNodeFilter *custom)
@@ -199,7 +199,7 @@ NodeFilter NodeFilter::createCustom(CustomNodeFilter *custom)
 // --------------------------------------------------------------
 CustomNodeFilter::CustomNodeFilter()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 CustomNodeFilter::~CustomNodeFilter()
@@ -225,7 +225,7 @@ DOMString CustomNodeFilter::customNodeFilterType()
 
 TreeWalker::TreeWalker()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 TreeWalker::TreeWalker(const TreeWalker &other)
@@ -259,7 +259,7 @@ TreeWalker::~TreeWalker()
 Node TreeWalker::root()
 {
     if (impl) return impl->getRoot();
-    return 0;
+    return nullptr;
 }
 
 unsigned long TreeWalker::whatToShow()
@@ -271,7 +271,7 @@ unsigned long TreeWalker::whatToShow()
 NodeFilter TreeWalker::filter()
 {
     if (impl) return impl->getFilter();
-    return 0;
+    return nullptr;
 }
 
 bool TreeWalker::expandEntityReferences()
@@ -283,7 +283,7 @@ bool TreeWalker::expandEntityReferences()
 Node TreeWalker::currentNode()
 {
     if (impl) return impl->getCurrentNode();
-    return 0;
+    return nullptr;
 }
 
 void TreeWalker::setCurrentNode(const Node& _currentNode)
@@ -294,43 +294,43 @@ void TreeWalker::setCurrentNode(const Node& _currentNode)
 Node TreeWalker::parentNode()
 {
     if (impl) return impl->parentNode();
-    return 0;
+    return nullptr;
 }
 
 Node TreeWalker::firstChild()
 {
     if (impl) return impl->firstChild();
-    return 0;
+    return nullptr;
 }
 
 Node TreeWalker::lastChild()
 {
     if (impl) return impl->lastChild();
-    return 0;
+    return nullptr;
 }
 
 Node TreeWalker::previousSibling()
 {
     if (impl) return impl->previousSibling();
-    return 0;
+    return nullptr;
 }
 
 Node TreeWalker::nextSibling()
 {
     if (impl) return impl->nextSibling();
-    return 0;
+    return nullptr;
 }
 
 Node TreeWalker::previousNode()
 {
     if (impl) return impl->previousNode();
-    return 0;
+    return nullptr;
 }
 
 Node TreeWalker::nextNode()
 {
     if (impl) return impl->nextNode();
-    return 0;
+    return nullptr;
 }
 
 TreeWalkerImpl *TreeWalker::handle() const
@@ -340,7 +340,7 @@ TreeWalkerImpl *TreeWalker::handle() const
 
 bool TreeWalker::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // -----------------------------------------------------------------------
diff --git a/tdehtml/dom/dom2_views.cpp b/tdehtml/dom/dom2_views.cpp
index 11b07fbb0..1140b244a 100644
--- a/tdehtml/dom/dom2_views.cpp
+++ b/tdehtml/dom/dom2_views.cpp
@@ -31,7 +31,7 @@ using namespace DOM;
 
 AbstractView::AbstractView()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 
@@ -88,7 +88,7 @@ AbstractViewImpl *AbstractView::handle() const
 
 bool AbstractView::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 
diff --git a/tdehtml/dom/dom_doc.cpp b/tdehtml/dom/dom_doc.cpp
index b38a01401..3564b0597 100644
--- a/tdehtml/dom/dom_doc.cpp
+++ b/tdehtml/dom/dom_doc.cpp
@@ -38,7 +38,7 @@ namespace DOM {
 
 DOMImplementation::DOMImplementation()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 DOMImplementation::DOMImplementation(const DOMImplementation &other)
@@ -108,7 +108,7 @@ HTMLDocument DOMImplementation::createHTMLDocument( const DOMString& title )
 {
     if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
 
-    HTMLDocumentImpl* r = impl->createHTMLDocument( 0 /* ### create a view otherwise it doesn't work */);
+    HTMLDocumentImpl* r = impl->createHTMLDocument( nullptr /* ### create a view otherwise it doesn't work */);
 
     r->open();
 
@@ -146,7 +146,7 @@ DOMImplementationImpl *DOMImplementation::handle() const
 
 bool DOMImplementation::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 // ----------------------------------------------------------------------------
@@ -168,7 +168,7 @@ Document::Document(bool create)
 	impl->ref();
     }
     else
-	impl = 0;
+	impl = nullptr;
 //    kdDebug(6090) << "Document::Document(bool)" << endl;
 }
 
@@ -188,7 +188,7 @@ Document &Document::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != DOCUMENT_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -210,19 +210,19 @@ Document::~Document()
 DocumentType Document::doctype() const
 {
     if (impl) return ((DocumentImpl *)impl)->doctype();
-    return 0;
+    return nullptr;
 }
 
 DOMImplementation Document::implementation() const
 {
     if (impl) return ((DocumentImpl *)impl)->implementation();
-    return 0;
+    return nullptr;
 }
 
 Element Document::documentElement() const
 {
     if (impl) return ((DocumentImpl *)impl)->documentElement();
-    return 0;
+    return nullptr;
 }
 
 Element Document::createElement( const DOMString &tagName )
@@ -252,32 +252,32 @@ Element Document::createElementNS( const DOMString &namespaceURI, const DOMStrin
 DocumentFragment Document::createDocumentFragment(  )
 {
     if (impl) return ((DocumentImpl *)impl)->createDocumentFragment();
-    return 0;
+    return nullptr;
 }
 
 Text Document::createTextNode( const DOMString &data )
 {
     if (impl) return ((DocumentImpl *)impl)->createTextNode( data.implementation() );
-    return 0;
+    return nullptr;
 }
 
 Comment Document::createComment( const DOMString &data )
 {
     if (impl) return ((DocumentImpl *)impl)->createComment( data.implementation() );
-    return 0;
+    return nullptr;
 }
 
 CDATASection Document::createCDATASection( const DOMString &data )
 {
     // ### DOM1 spec says raise exception if html documents - what about XHTML documents?
     if (impl) return ((DocumentImpl *)impl)->createCDATASection( data.implementation() );
-    return 0;
+    return nullptr;
 }
 
 ProcessingInstruction Document::createProcessingInstruction( const DOMString &target, const DOMString &data )
 {
     if (impl) return ((DocumentImpl *)impl)->createProcessingInstruction( target, data.implementation() );
-    return 0;
+    return nullptr;
 }
 
 Attr Document::createAttribute( const DOMString &name )
@@ -305,18 +305,18 @@ Attr Document::createAttributeNS( const DOMString &namespaceURI, const DOMString
 EntityReference Document::createEntityReference( const DOMString &name )
 {
     if (impl) return ((DocumentImpl *)impl)->createEntityReference( name );
-    return 0;
+    return nullptr;
 }
 
 Element Document::getElementById( const DOMString &elementId ) const
 {
     if(impl) return ((DocumentImpl *)impl)->getElementById( elementId );
-    return 0;
+    return nullptr;
 }
 
 NodeList Document::getElementsByTagName( const DOMString &tagName )
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     NodeImpl::Id id;
     if ( tagName == "*" )
         id = 0;
@@ -327,7 +327,7 @@ NodeList Document::getElementsByTagName( const DOMString &tagName )
 
 NodeList Document::getElementsByTagNameNS( const DOMString &namespaceURI, const DOMString &localName )
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return new TagNodeListImpl( impl, namespaceURI, localName );
 }
 
@@ -352,7 +352,7 @@ bool Document::isHTMLDocument() const
 Range Document::createRange()
 {
     if (impl) return ((DocumentImpl *)impl)->createRange();
-    return 0;
+    return nullptr;
 }
 
 NodeIterator Document::createNodeIterator(Node root, unsigned long whatToShow,
@@ -440,7 +440,7 @@ void Document::setSelectedStylesheetSet(const DOMString& s)
 
 TDEHTMLView *Document::view() const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
 
     return static_cast<DocumentImpl*>(impl)->view();
 }
@@ -571,7 +571,7 @@ DocumentFragment &DocumentFragment::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != DOCUMENT_FRAGMENT_NODE) {
             if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
         } else {
             Node::operator =(other);
         }
@@ -615,7 +615,7 @@ DocumentType &DocumentType::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != DOCUMENT_TYPE_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -644,7 +644,7 @@ DOMString DocumentType::name() const
 NamedNodeMap DocumentType::entities() const
 {
     if (!impl)
-	return 0; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+	return nullptr; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
 
     return static_cast<DocumentTypeImpl*>(impl)->entities();
 }
@@ -652,7 +652,7 @@ NamedNodeMap DocumentType::entities() const
 NamedNodeMap DocumentType::notations() const
 {
     if (!impl)
-	return 0; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+	return nullptr; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
 
     return static_cast<DocumentTypeImpl*>(impl)->notations();
 }
diff --git a/tdehtml/dom/dom_element.cpp b/tdehtml/dom/dom_element.cpp
index d9872e37c..e1a0732cc 100644
--- a/tdehtml/dom/dom_element.cpp
+++ b/tdehtml/dom/dom_element.cpp
@@ -47,7 +47,7 @@ Attr &Attr::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || !ohandle->isAttributeNode()) {
             if (impl) impl->deref();
-            impl = 0;
+            impl = nullptr;
         } else {
             Node::operator =(other);
         }
@@ -79,7 +79,7 @@ bool Attr::specified() const
 
 Element Attr::ownerElement() const
 {
-  if (!impl) return 0;
+  if (!impl) return nullptr;
   return static_cast<AttrImpl*>(impl)->ownerElement();
 }
 
@@ -120,7 +120,7 @@ Element &Element::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || !ohandle->isElementNode()) {
             if (impl) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -190,10 +190,10 @@ Attr Element::getAttributeNode( const DOMString &name )
     if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
     if (!name.implementation()) throw DOMException(DOMException::NOT_FOUND_ERR);
     NodeImpl::Id id = impl->getDocument()->getId(NodeImpl::AttributeId, name.implementation(), true, true);
-    if (!id) return 0;
+    if (!id) return nullptr;
 
     ElementImpl* e = static_cast<ElementImpl*>(impl);
-    if (!e->attributes()) return 0;
+    if (!e->attributes()) return nullptr;
 
     return static_cast<AttrImpl*>(e->attributes()->getNamedItem(id, false, name.implementation()));
 }
@@ -230,7 +230,7 @@ Attr Element::removeAttributeNode( const Attr &oldAttr )
 
 NodeList Element::getElementsByTagName( const DOMString &tagName )
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     NodeImpl::Id id;
     if ( tagName == "*" )
         id = 0;
@@ -242,7 +242,7 @@ NodeList Element::getElementsByTagName( const DOMString &tagName )
 NodeList Element::getElementsByTagNameNS( const DOMString &namespaceURI,
                                           const DOMString &localName )
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return new TagNodeListImpl( impl, namespaceURI, localName );
 }
 
@@ -251,7 +251,7 @@ DOMString Element::getAttributeNS( const DOMString &namespaceURI,
 {
     if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
     if (!localName.implementation()) throw DOMException(DOMException::NOT_FOUND_ERR);
-    NodeImpl::Id id = impl->getDocument()->getId(NodeImpl::AttributeId, namespaceURI.implementation(), 0/*prefix*/, localName.implementation(), true, true);
+    NodeImpl::Id id = impl->getDocument()->getId(NodeImpl::AttributeId, namespaceURI.implementation(), nullptr/*prefix*/, localName.implementation(), true, true);
     ElementImpl* e = static_cast<ElementImpl*>(impl);
     return e->getAttribute(id, true);
 }
@@ -275,8 +275,8 @@ void Element::removeAttributeNS( const DOMString &namespaceURI,
 
     int exceptioncode = 0;
     NamedNodeMapImpl *attributes = static_cast<ElementImpl*>(impl)->attributes(false);
-    NodeImpl::Id id = impl->getDocument()->getId(NodeImpl::AttributeId, namespaceURI.implementation(), 0/*prefix*/, localName.implementation(), false, true);
-    attributes->removeNamedItem(id, true, 0, exceptioncode);
+    NodeImpl::Id id = impl->getDocument()->getId(NodeImpl::AttributeId, namespaceURI.implementation(), nullptr/*prefix*/, localName.implementation(), false, true);
+    attributes->removeNamedItem(id, true, nullptr, exceptioncode);
     if ( exceptioncode )
         throw DOMException( exceptioncode );
 }
@@ -287,9 +287,9 @@ Attr Element::getAttributeNodeNS( const DOMString &namespaceURI,
     if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
     if (!localName.implementation()) throw DOMException(DOMException::NOT_FOUND_ERR);
     NodeImpl::Id id = impl->getDocument()->getId(NodeImpl::AttributeId, namespaceURI.implementation(),
-						0/*prefix*/, localName.implementation(), true, true);
+						nullptr/*prefix*/, localName.implementation(), true, true);
     ElementImpl* e = static_cast<ElementImpl*>(impl);
-    if (!e->attributes()) return 0;
+    if (!e->attributes()) return nullptr;
 
     return static_cast<AttrImpl*>(e->attributes()->getNamedItem(id, true));
 }
@@ -301,7 +301,7 @@ Attr Element::setAttributeNodeNS( const Attr &newAttr )
     // WRONG_DOCUMENT_ERR and INUSE_ATTRIBUTE_ERR are already tested & thrown by setNamedItem
 
     int exceptioncode = 0;
-    Attr r = static_cast<ElementImpl*>(impl)->attributes(false)->setNamedItem(newAttr.handle(), true, 0, exceptioncode);
+    Attr r = static_cast<ElementImpl*>(impl)->attributes(false)->setNamedItem(newAttr.handle(), true, nullptr, exceptioncode);
     if ( exceptioncode )
         throw DOMException( exceptioncode );
     static_cast<AttrImpl *>(newAttr.handle())->setOwnerElement( static_cast<ElementImpl*>(impl) );
@@ -316,7 +316,7 @@ bool Element::hasAttribute( const DOMString& name )
     if (!id) return false;
 
     if (!static_cast<ElementImpl*>(impl)->attributes(true /*readonly*/)) return false;
-    return static_cast<ElementImpl*>(impl)->attributes(true)->getValue(id, false, name.implementation()) != 0;
+    return static_cast<ElementImpl*>(impl)->attributes(true)->getValue(id, false, name.implementation()) != nullptr;
 }
 
 bool Element::hasAttributeNS( const DOMString &namespaceURI,
@@ -325,8 +325,8 @@ bool Element::hasAttributeNS( const DOMString &namespaceURI,
     if (!impl || !static_cast<ElementImpl*>(impl)->attributes()) return false; // ### throw ?
     if (!static_cast<ElementImpl*>(impl)->attributes(true /*readonly*/)) return false;
     NodeImpl::Id id = impl->getDocument()->getId(NodeImpl::AttributeId,namespaceURI.implementation(),
-						 0/*prefix*/, localName.implementation(), true, true);
-    return static_cast<ElementImpl*>(impl)->attributes(true)->getValue(id, true) != 0;
+						 nullptr/*prefix*/, localName.implementation(), true, true);
+    return static_cast<ElementImpl*>(impl)->attributes(true)->getValue(id, true) != nullptr;
 }
 
 bool Element::isHTMLElement() const
@@ -337,19 +337,19 @@ bool Element::isHTMLElement() const
 
 Element Element::form() const
 {
-    if (!impl || !impl->isGenericFormElement()) return 0;
+    if (!impl || !impl->isGenericFormElement()) return nullptr;
     return static_cast<HTMLGenericFormElementImpl*>(impl)->form();
     ElementImpl* f = static_cast<HTMLGenericFormElementImpl*>( impl )->form();
 
     if( f && f->implicitNode() )
-        return 0;
+        return nullptr;
     return f;
 }
 
 CSSStyleDeclaration Element::style()
 {
     if (impl) return ((ElementImpl *)impl)->styleRules();
-    return 0;
+    return nullptr;
 }
 
 bool Element::contentEditable() const {
diff --git a/tdehtml/dom/dom_node.cpp b/tdehtml/dom/dom_node.cpp
index 9971bdb00..ae9b72606 100644
--- a/tdehtml/dom/dom_node.cpp
+++ b/tdehtml/dom/dom_node.cpp
@@ -33,7 +33,7 @@ using namespace DOM;
 
 NamedNodeMap::NamedNodeMap()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 NamedNodeMap::NamedNodeMap(const NamedNodeMap &other)
@@ -65,9 +65,9 @@ NamedNodeMap::~NamedNodeMap()
 
 Node NamedNodeMap::getNamedItem( const DOMString &name ) const
 {
-    if (!impl) return 0;
-    NodeImpl::Id nid = impl->mapId(0, name.implementation(), true);
-    if (!nid) return 0;
+    if (!impl) return nullptr;
+    NodeImpl::Id nid = impl->mapId(nullptr, name.implementation(), true);
+    if (!nid) return nullptr;
     return impl->getNamedItem(nid, false, name.implementation());
 }
 
@@ -87,7 +87,7 @@ Node NamedNodeMap::removeNamedItem( const DOMString &name )
 {
     if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
     int exceptioncode = 0;
-    Node r = impl->removeNamedItem(impl->mapId(0, name.implementation(), false),
+    Node r = impl->removeNamedItem(impl->mapId(nullptr, name.implementation(), false),
                                    false, name.implementation(), exceptioncode);
     if (exceptioncode)
         throw DOMException(exceptioncode);
@@ -96,13 +96,13 @@ Node NamedNodeMap::removeNamedItem( const DOMString &name )
 
 Node NamedNodeMap::item( unsigned long index ) const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->item(index);
 }
 
 Node NamedNodeMap::getNamedItemNS( const DOMString &namespaceURI, const DOMString &localName ) const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     NodeImpl::Id nid = impl->mapId( namespaceURI.implementation(), localName.implementation(), true );
     return impl->getNamedItem(nid, true);
 }
@@ -111,7 +111,7 @@ Node NamedNodeMap::setNamedItemNS( const Node &arg )
 {
     if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
     int exceptioncode = 0;
-    Node r = impl->setNamedItem(arg.impl, true, 0, exceptioncode);
+    Node r = impl->setNamedItem(arg.impl, true, nullptr, exceptioncode);
     if (exceptioncode)
         throw DOMException(exceptioncode);
     return r;
@@ -122,7 +122,7 @@ Node NamedNodeMap::removeNamedItemNS( const DOMString &namespaceURI, const DOMSt
     if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
     int exceptioncode = 0;
     NodeImpl::Id nid = impl->mapId( namespaceURI.implementation(), localName.implementation(), false );
-    Node r = impl->removeNamedItem(nid, true, 0, exceptioncode);
+    Node r = impl->removeNamedItem(nid, true, nullptr, exceptioncode);
     if (exceptioncode)
         throw DOMException(exceptioncode);
     return r;
@@ -210,7 +210,7 @@ Node Node::parentNode() const
 
 NodeList Node::childNodes() const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->childNodes();
 }
 
@@ -240,7 +240,7 @@ Node Node::nextSibling() const
 
 NamedNodeMap Node::attributes() const
 {
-    if (!impl || !impl->isElementNode()) return 0;
+    if (!impl || !impl->isElementNode()) return nullptr;
     return static_cast<ElementImpl*>(impl)->attributes();
 }
 
@@ -316,7 +316,7 @@ bool Node::hasChildNodes(  )
 
 Node Node::cloneNode( bool deep )
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->cloneNode( deep  );
 }
 
@@ -452,7 +452,7 @@ void Node::setTextContent(const DOMString &content) const
 
 NodeList::NodeList()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 NodeList::NodeList(const NodeList &other)
@@ -484,7 +484,7 @@ NodeList::~NodeList()
 
 Node NodeList::item( unsigned long index ) const
 {
-    if (!impl) return 0;
+    if (!impl) return nullptr;
     return impl->item(index);
 }
 
diff --git a/tdehtml/dom/dom_node.h b/tdehtml/dom/dom_node.h
index 47f3ba9ef..afe639f5b 100644
--- a/tdehtml/dom/dom_node.h
+++ b/tdehtml/dom/dom_node.h
@@ -279,7 +279,7 @@ class TDEHTML_EXPORT Node
     friend class StyleSheet;
 
 public:
-    Node() : impl(0) {}
+    Node() : impl(nullptr) {}
     Node(const Node &other);
 
     /**
diff --git a/tdehtml/dom/dom_string.cpp b/tdehtml/dom/dom_string.cpp
index 14bdc2613..8fe6b224c 100644
--- a/tdehtml/dom/dom_string.cpp
+++ b/tdehtml/dom/dom_string.cpp
@@ -35,7 +35,7 @@ DOMString::DOMString(const TQChar *str, uint len)
 DOMString::DOMString(const TQString &str)
 {
     if (str.isNull()) {
-	impl = 0;
+	impl = nullptr;
 	return;
     }
 
@@ -46,7 +46,7 @@ DOMString::DOMString(const TQString &str)
 DOMString::DOMString(const char *str)
 {
     if (!str) {
-	impl = 0;
+	impl = nullptr;
 	return;
     }
 
@@ -195,7 +195,7 @@ bool DOMString::percentage(int &_percentage) const
 
 TQChar *DOMString::unicode() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return impl->unicode();
 }
 
diff --git a/tdehtml/dom/dom_string.h b/tdehtml/dom/dom_string.h
index a82d1018b..096e9ffe3 100644
--- a/tdehtml/dom/dom_string.h
+++ b/tdehtml/dom/dom_string.h
@@ -48,7 +48,7 @@ public:
     /**
      * default constructor. Gives an empty DOMString
      */
-    DOMString() : impl(0) {}
+    DOMString() : impl(nullptr) {}
 
     DOMString(const TQChar *str, uint len);
     DOMString(const TQString &);
@@ -105,7 +105,7 @@ public:
 
     DOMString copy() const;
 
-    bool isNull()  const { return (impl == 0); }
+    bool isNull()  const { return (impl == nullptr); }
     bool isEmpty()  const;
 
     /**
diff --git a/tdehtml/dom/dom_text.cpp b/tdehtml/dom/dom_text.cpp
index af4584410..915989db3 100644
--- a/tdehtml/dom/dom_text.cpp
+++ b/tdehtml/dom/dom_text.cpp
@@ -43,7 +43,7 @@ CharacterData &CharacterData::operator = (const Node &other)
               ohandle->nodeType() != TEXT_NODE &&
               ohandle->nodeType() != COMMENT_NODE )) {
             if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
         } else {
             Node::operator =(other);
 	}
@@ -162,7 +162,7 @@ Comment &Comment::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != COMMENT_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -202,7 +202,7 @@ Text &Text::operator = (const Node &other)
             (ohandle->nodeType() != TEXT_NODE &&
              ohandle->nodeType() != CDATA_SECTION_NODE)) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -223,7 +223,7 @@ Text::~Text()
 Text Text::splitText( const unsigned long offset )
 {
     if (!impl)
-	return 0; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
+	return nullptr; // ### enable throw DOMException(DOMException::NOT_FOUND_ERR);
 
     int exceptioncode = 0;
     TextImpl *newText = static_cast<TextImpl *>(impl)->splitText(offset, exceptioncode );
diff --git a/tdehtml/dom/dom_xml.cpp b/tdehtml/dom/dom_xml.cpp
index 524bbe218..955083b75 100644
--- a/tdehtml/dom/dom_xml.cpp
+++ b/tdehtml/dom/dom_xml.cpp
@@ -42,7 +42,7 @@ CDATASection &CDATASection::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != CDATA_SECTION_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -79,7 +79,7 @@ Entity &Entity::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != ENTITY_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -141,7 +141,7 @@ EntityReference &EntityReference::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != ENTITY_REFERENCE_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -179,7 +179,7 @@ Notation &Notation::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != NOTATION_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -235,7 +235,7 @@ ProcessingInstruction &ProcessingInstruction::operator = (const Node &other)
     if ( impl != ohandle ) {
         if (!ohandle || ohandle->nodeType() != PROCESSING_INSTRUCTION_NODE) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -287,7 +287,7 @@ ProcessingInstruction::ProcessingInstruction(ProcessingInstructionImpl *i) : Nod
 StyleSheet ProcessingInstruction::sheet() const
 {
     if (impl) return ((ProcessingInstructionImpl*)impl)->sheet();
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/tdehtml/dom/html_block.cpp b/tdehtml/dom/html_block.cpp
index 9e499adb0..6f43130d7 100644
--- a/tdehtml/dom/html_block.cpp
+++ b/tdehtml/dom/html_block.cpp
@@ -228,7 +228,7 @@ HTMLHeadingElement &HTMLHeadingElement::operator = (const Node &other)
        other.elementId() != ID_H6 )
     {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else {
     Node::operator = (other);
     }
diff --git a/tdehtml/dom/html_document.cpp b/tdehtml/dom/html_document.cpp
index 0d0af0ab9..e67a031e8 100644
--- a/tdehtml/dom/html_document.cpp
+++ b/tdehtml/dom/html_document.cpp
@@ -58,12 +58,12 @@ HTMLDocument &HTMLDocument::operator = (const Node &other)
 {
     if(other.nodeType() != DOCUMENT_NODE) {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else {
 	DocumentImpl *d = static_cast<DocumentImpl *>(other.handle());
 	if(!d->isHTMLDocument()) {
 	    if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
 	} else {
             Node::operator =(other);
 	}
@@ -126,7 +126,7 @@ DOMString HTMLDocument::URL() const
 
 HTMLElement HTMLDocument::body() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLDocumentImpl *)impl)->body();
 }
 
@@ -227,7 +227,7 @@ void HTMLDocument::writeln( const DOMString &text )
 
 NodeList HTMLDocument::getElementsByName( const DOMString &elementName )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return new NameNodeListImpl(impl, elementName);
 }
 
diff --git a/tdehtml/dom/html_element.cpp b/tdehtml/dom/html_element.cpp
index 0063985ea..19fac52fd 100644
--- a/tdehtml/dom/html_element.cpp
+++ b/tdehtml/dom/html_element.cpp
@@ -51,7 +51,7 @@ HTMLElement &HTMLElement::operator = (const Node &other)
     NodeImpl* ohandle = other.handle();
     if (!ohandle || !ohandle->isHTMLElement()) {
         if (impl) impl->deref();
-	impl = 0;
+	impl = nullptr;
 	return *this;
     }
     Node::operator = (other);
@@ -179,7 +179,7 @@ void HTMLElement::assignOther( const Node &other, int elementId )
 {
     if (other.elementId() != static_cast<TQ_UINT32>(elementId)) {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else {
 	Node::operator = (other);
     }
diff --git a/tdehtml/dom/html_form.cpp b/tdehtml/dom/html_form.cpp
index 5d9aec633..3ced8b6f3 100644
--- a/tdehtml/dom/html_form.cpp
+++ b/tdehtml/dom/html_form.cpp
@@ -85,7 +85,7 @@ bool HTMLButtonElement::disabled() const
 
 void HTMLButtonElement::setDisabled( bool _disabled )
 {
-    if (impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
+    if (impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : nullptr);
 }
 
 DOMString HTMLButtonElement::name() const
@@ -348,7 +348,7 @@ bool HTMLInputElement::defaultChecked() const
 void HTMLInputElement::setDefaultChecked( bool _defaultChecked )
 {
     if(impl)
-	((ElementImpl *)impl)->setAttribute(ATTR_CHECKED, _defaultChecked ? "" : 0);
+	((ElementImpl *)impl)->setAttribute(ATTR_CHECKED, _defaultChecked ? "" : nullptr);
 }
 
 HTMLFormElement HTMLInputElement::form() const
@@ -434,7 +434,7 @@ void HTMLInputElement::setDisabled( bool _disabled )
 {
     if(impl)
     {
-	((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
+	((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : nullptr);
     }
 }
 
@@ -472,7 +472,7 @@ bool HTMLInputElement::readOnly() const
 void HTMLInputElement::setReadOnly( bool _readOnly )
 {
     if(impl)
-	static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);
+	static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : nullptr);
 }
 
 /* The next two are provided for backwards compatibility. */
@@ -762,7 +762,7 @@ bool HTMLOptGroupElement::disabled() const
 void HTMLOptGroupElement::setDisabled( bool _disabled )
 {
     if(impl)
-	static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
+	static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : nullptr);
 }
 
 DOMString HTMLOptGroupElement::label() const
@@ -861,7 +861,7 @@ bool HTMLSelectElement::disabled() const
 
 void HTMLSelectElement::setDisabled( bool _disabled )
 {
-    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
+    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : nullptr);
 }
 
 
@@ -873,7 +873,7 @@ bool HTMLSelectElement::multiple() const
 
 void HTMLSelectElement::setMultiple( bool _multiple )
 {
-    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_MULTIPLE, _multiple ? "" : 0);
+    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_MULTIPLE, _multiple ? "" : nullptr);
 }
 
 DOMString HTMLSelectElement::name() const
@@ -1022,7 +1022,7 @@ bool HTMLTextAreaElement::disabled() const
 
 void HTMLTextAreaElement::setDisabled( bool _disabled )
 {
-    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
+    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : nullptr);
 }
 
 DOMString HTMLTextAreaElement::name() const
@@ -1044,7 +1044,7 @@ bool HTMLTextAreaElement::readOnly() const
 
 void HTMLTextAreaElement::setReadOnly( bool _readOnly )
 {
-    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);
+    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : nullptr);
 }
 
 long HTMLTextAreaElement::rows() const
@@ -1191,7 +1191,7 @@ bool HTMLOptionElement::defaultSelected() const
 
 void HTMLOptionElement::setDefaultSelected( bool _defaultSelected )
 {
-    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SELECTED, _defaultSelected ? "" : 0);
+    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SELECTED, _defaultSelected ? "" : nullptr);
 }
 
 DOMString HTMLOptionElement::text() const
@@ -1219,7 +1219,7 @@ bool HTMLOptionElement::disabled() const
 
 void HTMLOptionElement::setDisabled( bool _disabled )
 {
-    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
+    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : nullptr);
 }
 
 DOMString HTMLOptionElement::label() const
diff --git a/tdehtml/dom/html_head.cpp b/tdehtml/dom/html_head.cpp
index e5e72e73b..5efdd0ad6 100644
--- a/tdehtml/dom/html_head.cpp
+++ b/tdehtml/dom/html_head.cpp
@@ -118,7 +118,7 @@ bool HTMLLinkElement::disabled() const
 void HTMLLinkElement::setDisabled( bool _disabled )
 {
     if(impl)
-        ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
+        ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : nullptr);
 }
 
 DOMString HTMLLinkElement::charset() const
@@ -212,7 +212,7 @@ void HTMLLinkElement::setType( const DOMString &value )
 
 StyleSheet HTMLLinkElement::sheet() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLLinkElementImpl *)impl)->sheet();
 }
 
@@ -374,7 +374,7 @@ void HTMLScriptElement::setDefer( bool _defer )
 {
 
     if(impl)
-        ((ElementImpl *)impl)->setAttribute(ATTR_DEFER,_defer ? "" : 0);
+        ((ElementImpl *)impl)->setAttribute(ATTR_DEFER,_defer ? "" : nullptr);
 }
 
 DOMString HTMLScriptElement::src() const
@@ -440,7 +440,7 @@ void HTMLStyleElement::setDisabled( bool _disabled )
 {
 
     if(impl)
-        ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED,_disabled ? "" : 0);
+        ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED,_disabled ? "" : nullptr);
 }
 
 DOMString HTMLStyleElement::media() const
@@ -467,7 +467,7 @@ void HTMLStyleElement::setType( const DOMString &value )
 
 StyleSheet HTMLStyleElement::sheet() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLStyleElementImpl *)impl)->sheet();
 }
 
diff --git a/tdehtml/dom/html_inline.cpp b/tdehtml/dom/html_inline.cpp
index 568761685..6b952c3dc 100644
--- a/tdehtml/dom/html_inline.cpp
+++ b/tdehtml/dom/html_inline.cpp
@@ -198,7 +198,7 @@ void HTMLAnchorElement::setType( const DOMString &value )
 void HTMLAnchorElement::blur(  )
 {
     if(impl && impl->getDocument()->focusNode()==impl)
-        impl->getDocument()->setFocusNode(0);
+        impl->getDocument()->setFocusNode(nullptr);
 }
 
 void HTMLAnchorElement::focus(  )
@@ -334,7 +334,7 @@ HTMLModElement::HTMLModElement(HTMLElementImpl *_impl)
     if (_impl && (_impl->id() == ID_INS || _impl->id() == ID_DEL))
         impl = _impl;
     else
-        impl = 0;
+        impl = nullptr;
     if ( impl ) impl->ref();
 }
 
@@ -345,7 +345,7 @@ HTMLModElement &HTMLModElement::operator = (const Node &other)
             other.elementId() != ID_DEL )
         {
             if ( impl ) impl->deref();
-            impl = 0;
+            impl = nullptr;
         } else {
             Node::operator = (other);
         }
@@ -401,7 +401,7 @@ HTMLQuoteElement::HTMLQuoteElement(HTMLGenericElementImpl *_impl)
     if (_impl && _impl->id() == ID_Q)
         impl = _impl;
     else
-        impl = 0;
+        impl = nullptr;
     if ( impl ) impl->ref();
 }
 
diff --git a/tdehtml/dom/html_misc.cpp b/tdehtml/dom/html_misc.cpp
index fb975b7cf..ebd1782af 100644
--- a/tdehtml/dom/html_misc.cpp
+++ b/tdehtml/dom/html_misc.cpp
@@ -107,7 +107,7 @@ void HTMLBaseFontElement::setSize( long _value )
 // --------------------------------------------------------------------------
 
 HTMLCollection::HTMLCollection()
-  : impl(0)
+  : impl(nullptr)
 {
 }
 
@@ -146,20 +146,20 @@ unsigned long HTMLCollection::length() const
 
 Node HTMLCollection::item( unsigned long index ) const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLCollectionImpl *)impl)->item( index );
 }
 
 Node HTMLCollection::namedItem( const DOMString &name ) const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLCollectionImpl *)impl)->namedItem( name );
 }
 
 Node HTMLCollection::base() const
 {
     if ( !impl )
-        return 0;
+        return nullptr;
 
     return static_cast<HTMLCollectionImpl*>( impl )->m_refNode;
 }
@@ -167,21 +167,21 @@ Node HTMLCollection::base() const
 Node HTMLCollection::firstItem() const
 {
     if ( !impl )
-        return 0;
+        return nullptr;
     return static_cast<HTMLCollectionImpl*>( impl )->firstItem();
 }
 
 Node HTMLCollection::nextItem() const
 {
     if ( !impl )
-        return 0;
+        return nullptr;
     return static_cast<HTMLCollectionImpl*>( impl )->nextItem();
 }
 
 Node HTMLCollection::nextNamedItem( const DOMString &name ) const
 {
     if ( !impl )
-        return 0;
+        return nullptr;
     return static_cast<HTMLCollectionImpl*>( impl )->nextNamedItem( name );
 }
 
@@ -192,7 +192,7 @@ HTMLCollectionImpl *HTMLCollection::handle() const
 
 bool HTMLCollection::isNull() const
 {
-    return (impl == 0);
+    return (impl == nullptr);
 }
 
 
diff --git a/tdehtml/dom/html_object.cpp b/tdehtml/dom/html_object.cpp
index 65ec2f34e..318b37f96 100644
--- a/tdehtml/dom/html_object.cpp
+++ b/tdehtml/dom/html_object.cpp
@@ -231,7 +231,7 @@ HTMLObjectElement::~HTMLObjectElement()
 
 HTMLFormElement HTMLObjectElement::form() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLObjectElementImpl *)impl)->form();
 }
 
diff --git a/tdehtml/dom/html_table.cpp b/tdehtml/dom/html_table.cpp
index b42c4fcd1..db49f514e 100644
--- a/tdehtml/dom/html_table.cpp
+++ b/tdehtml/dom/html_table.cpp
@@ -90,7 +90,7 @@ HTMLTableCellElement &HTMLTableCellElement::operator = (const Node &other)
 	other.elementId() != ID_TH )
     {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else {
     Node::operator = (other);
     }
@@ -229,7 +229,7 @@ bool HTMLTableCellElement::noWrap() const
 void HTMLTableCellElement::setNoWrap( bool _noWrap )
 {
     if(impl)
-	((ElementImpl *)impl)->setAttribute(ATTR_NOWRAP, _noWrap ? "" : 0);
+	((ElementImpl *)impl)->setAttribute(ATTR_NOWRAP, _noWrap ? "" : nullptr);
 }
 
 long HTMLTableCellElement::rowSpan() const
@@ -299,7 +299,7 @@ HTMLTableColElement &HTMLTableColElement::operator = (const Node &other)
 	other.elementId() != ID_COLGROUP )
     {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else {
     Node::operator = (other);
     }
@@ -417,7 +417,7 @@ HTMLTableElement::~HTMLTableElement()
 
 HTMLTableCaptionElement HTMLTableElement::caption() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLTableElementImpl *)impl)->caption();
 }
 
@@ -430,7 +430,7 @@ void HTMLTableElement::setCaption( const HTMLTableCaptionElement &_caption )
 
 HTMLTableSectionElement HTMLTableElement::tHead() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLTableElementImpl *)impl)->tHead();
 }
 
@@ -444,7 +444,7 @@ void HTMLTableElement::setTHead( const HTMLTableSectionElement &_tHead )
 
 HTMLTableSectionElement HTMLTableElement::tFoot() const
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLTableElementImpl *)impl)->tFoot();
 }
 
@@ -569,7 +569,7 @@ void HTMLTableElement::setWidth( const DOMString &value )
 
 HTMLElement HTMLTableElement::createTHead(  )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLTableElementImpl *)impl)->createTHead(  );
 }
 
@@ -581,7 +581,7 @@ void HTMLTableElement::deleteTHead(  )
 
 HTMLElement HTMLTableElement::createTFoot(  )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLTableElementImpl *)impl)->createTFoot(  );
 }
 
@@ -593,7 +593,7 @@ void HTMLTableElement::deleteTFoot(  )
 
 HTMLElement HTMLTableElement::createCaption(  )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     return ((HTMLTableElementImpl *)impl)->createCaption(  );
 }
 
@@ -605,7 +605,7 @@ void HTMLTableElement::deleteCaption(  )
 
 HTMLElement HTMLTableElement::insertRow( long index )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     int exceptioncode = 0;
     HTMLElementImpl* ret = ((HTMLTableElementImpl *)impl)->insertRow( index, exceptioncode );
     if (exceptioncode)
@@ -742,7 +742,7 @@ void HTMLTableRowElement::setVAlign( const DOMString &value )
 
 HTMLElement HTMLTableRowElement::insertCell( long index )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     int exceptioncode = 0;
     HTMLElementImpl* ret = ((HTMLTableRowElementImpl *)impl)->insertCell( index, exceptioncode );
     if (exceptioncode)
@@ -780,7 +780,7 @@ HTMLTableSectionElement &HTMLTableSectionElement::operator = (const Node &other)
        other.elementId() != ID_TFOOT )
     {
 	if ( impl ) impl->deref();
-	impl = 0;
+	impl = nullptr;
     } else {
     Node::operator = (other);
     }
@@ -849,7 +849,7 @@ HTMLCollection HTMLTableSectionElement::rows() const
 
 HTMLElement HTMLTableSectionElement::insertRow( long index )
 {
-    if(!impl) return 0;
+    if(!impl) return nullptr;
     int exceptioncode = 0;
     HTMLElementImpl* ret = ((HTMLTableSectionElementImpl *)impl)->insertRow( index, exceptioncode );
     if (exceptioncode)
diff --git a/tdehtml/domtreeview.h b/tdehtml/domtreeview.h
index b79938b1a..bd58b74f4 100644
--- a/tdehtml/domtreeview.h
+++ b/tdehtml/domtreeview.h
@@ -28,7 +28,7 @@ class DOMTreeView : public TDEListView
 {
     TQ_OBJECT
     public: 
-	DOMTreeView(TQWidget *parent, TDEHTMLPart *part, const char * name = 0);
+	DOMTreeView(TQWidget *parent, TDEHTMLPart *part, const char * name = nullptr);
 	~DOMTreeView();
 
 	void recursive(const DOM::Node &pNode, const DOM::Node &node);
diff --git a/tdehtml/ecma/domparser.cpp b/tdehtml/ecma/domparser.cpp
index a91e6bf1f..acd3e6473 100644
--- a/tdehtml/ecma/domparser.cpp
+++ b/tdehtml/ecma/domparser.cpp
@@ -60,7 +60,7 @@ Object DOMParserConstructorImp::construct(ExecState *exec, const List &)
   return Object(new DOMParser(exec, doc.get()));
 }
 
-const ClassInfo DOMParser::info = { "DOMParser", 0, 0 /* &DOMParserTable*/, 0 };
+const ClassInfo DOMParser::info = { "DOMParser", nullptr, nullptr /* &DOMParserTable*/, nullptr };
 
 
 DOMParser::DOMParser(ExecState *exec, DOM::DocumentImpl *d)
diff --git a/tdehtml/ecma/kjs_binding.cpp b/tdehtml/ecma/kjs_binding.cpp
index c3dd39255..6f20a53cc 100644
--- a/tdehtml/ecma/kjs_binding.cpp
+++ b/tdehtml/ecma/kjs_binding.cpp
@@ -174,7 +174,7 @@ static InterpreterList *interpreterList;
 
 ScriptInterpreter::ScriptInterpreter( const Object &global, tdehtml::ChildFrame* frame )
   : Interpreter( global ), m_frame( frame ), m_domObjects(1021),
-    m_evt( 0L ), m_inlineCode(false), m_timerCallback(false)
+    m_evt( nullptr ), m_inlineCode(false), m_timerCallback(false)
 {
 #ifdef KJS_VERBOSE
   kdDebug(6070) << "ScriptInterpreter::ScriptInterpreter " << this << " for part=" << m_frame << endl;
@@ -193,7 +193,7 @@ ScriptInterpreter::~ScriptInterpreter()
   interpreterList->remove( this );
   if ( interpreterList->isEmpty() ) {
     delete interpreterList;
-    interpreterList = 0;
+    interpreterList = nullptr;
   }
 }
 
diff --git a/tdehtml/ecma/kjs_binding.h b/tdehtml/ecma/kjs_binding.h
index f8276bcb8..a2ceafaf9 100644
--- a/tdehtml/ecma/kjs_binding.h
+++ b/tdehtml/ecma/kjs_binding.h
@@ -288,8 +288,8 @@ namespace KJS {
             return s_name; \
         }\
       }; \
-      Identifier* ClassProto::s_name = 0; \
-      const ClassInfo ClassProto::info = { ClassName, 0, 0, 0 };
+      Identifier* ClassProto::s_name = nullptr; \
+      const ClassInfo ClassProto::info = { ClassName, nullptr, nullptr, nullptr };
       
 #define KJS_EMPTY_PROTOTYPE_WITH_PROTOTYPE(ClassName, ClassProto, ClassProtoProto) \
   KJS_EMPTY_PROTOTYPE_IMP(ClassName, ClassProto, ClassProtoProto::self(exec))
@@ -297,8 +297,8 @@ namespace KJS {
 //### this doesn't implement hasProperty, but stuff in lookup.h didn't 
 //either (just did the forward)
 #define KJS_IMPLEMENT_PROTOTYPE(ClassName, ClassProto, ClassFunc) \
-    const ClassInfo ClassProto::info = { ClassName, 0, &ClassProto##Table, 0 }; \
-    Identifier* ClassProto::s_name = 0; \
+    const ClassInfo ClassProto::info = { ClassName, nullptr, &ClassProto##Table, nullptr }; \
+    Identifier* ClassProto::s_name = nullptr; \
     Object ClassProto::self(ExecState *exec) \
     { \
       return cacheGlobalObject<ClassProto>(exec, *name()); \
@@ -345,7 +345,7 @@ namespace KJS {
   };
 
 #define IMPLEMENT_PSEUDO_CONSTRUCTOR_IMP(Class,ClassName,ProtoClass,ParentProto) \
-    const ClassInfo Class::info = { ClassName, 0, 0, 0 }; \
+    const ClassInfo Class::info = { ClassName, nullptr, nullptr, nullptr }; \
     Class::Class(ExecState* exec): DOMObject(ParentProto) {\
         Object proto = ProtoClass::self(exec); \
         putDirect(prototypePropertyName, proto.imp(), DontDelete|ReadOnly); \
@@ -388,12 +388,12 @@ namespace KJS {
     Object Class::self(ExecState *exec) { \
         return cacheGlobalObject<Class>(exec, *name()); \
     } \
-    Identifier* Class::s_name = 0; \
+    Identifier* Class::s_name = nullptr; \
     Identifier* Class::name() { \
         if (!s_name) s_name = new Identifier("[[" ClassName ".constant_table]]"); \
         return s_name; \
     } \
-    const ClassInfo Class::info = { ClassName, 0, &Class##Table, 0 };
+    const ClassInfo Class::info = { ClassName, nullptr, &Class##Table, nullptr };
 
    
 // Hide some of the stuff in lookup.h..
diff --git a/tdehtml/ecma/kjs_css.cpp b/tdehtml/ecma/kjs_css.cpp
index 32fb08e19..9ce17f5d1 100644
--- a/tdehtml/ecma/kjs_css.cpp
+++ b/tdehtml/ecma/kjs_css.cpp
@@ -83,7 +83,7 @@ KJS_IMPLEMENT_PROTOTYPE("DOMCSSStyleDeclaration", DOMCSSStyleDeclarationProto, D
 
 IMPLEMENT_PSEUDO_CONSTRUCTOR(CSSStyleDeclarationPseudoCtor, "DOMCSSStyleDeclaration",DOMCSSStyleDeclarationProto)
 
-const ClassInfo DOMCSSStyleDeclaration::info = { "CSSStyleDeclaration", 0, &DOMCSSStyleDeclarationTable, 0 };
+const ClassInfo DOMCSSStyleDeclaration::info = { "CSSStyleDeclaration", nullptr, &DOMCSSStyleDeclarationTable, nullptr };
 
 DOMCSSStyleDeclaration::DOMCSSStyleDeclaration(ExecState *exec, const DOM::CSSStyleDeclaration& s)
   : DOMObject(DOMCSSStyleDeclarationProto::self(exec)), styleDecl(s)
@@ -232,7 +232,7 @@ Value getDOMCSSStyleDeclaration(ExecState *exec, const DOM::CSSStyleDeclaration&
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMStyleSheet::info = { "StyleSheet", 0, &DOMStyleSheetTable, 0 };
+const ClassInfo DOMStyleSheet::info = { "StyleSheet", nullptr, &DOMStyleSheetTable, nullptr };
 /*
 @begin DOMStyleSheetTable 7
   type		DOMStyleSheet::Type		DontDelete|ReadOnly
@@ -313,7 +313,7 @@ Value getDOMStyleSheet(ExecState *exec, const DOM::StyleSheet& ss)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMStyleSheetList::info = { "StyleSheetList", 0, &DOMStyleSheetListTable, 0 };
+const ClassInfo DOMStyleSheetList::info = { "StyleSheetList", nullptr, &DOMStyleSheetListTable, nullptr };
 
 /*
 @begin DOMStyleSheetListTable 2
@@ -434,7 +434,7 @@ Value DOMStyleSheetListFunc::tryCall(ExecState *exec, Object &thisObj, const Lis
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMMediaList::info = { "MediaList", 0, &DOMMediaListTable, 0 };
+const ClassInfo DOMMediaList::info = { "MediaList", nullptr, &DOMMediaListTable, nullptr };
 
 /*
 @begin DOMMediaListTable 2
@@ -507,7 +507,7 @@ Value KJS::DOMMediaListProtoFunc::tryCall(ExecState *exec, Object &thisObj, cons
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMCSSStyleSheet::info = { "CSSStyleSheet", 0, &DOMCSSStyleSheetTable, 0 };
+const ClassInfo DOMCSSStyleSheet::info = { "CSSStyleSheet", nullptr, &DOMCSSStyleSheetTable, nullptr };
 
 /*
 @begin DOMCSSStyleSheetTable 2
@@ -579,7 +579,7 @@ Value DOMCSSStyleSheetProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMCSSRuleList::info = { "CSSRuleList", 0, &DOMCSSRuleListTable, 0 };
+const ClassInfo DOMCSSRuleList::info = { "CSSRuleList", nullptr, &DOMCSSRuleListTable, nullptr };
 /*
 @begin DOMCSSRuleListTable 3
   length		DOMCSSRuleList::Length		DontDelete|ReadOnly
@@ -645,13 +645,13 @@ DOMCSSRule::~DOMCSSRule()
   ScriptInterpreter::forgetDOMObject(cssRule.handle());
 }
 
-const ClassInfo DOMCSSRule::info = { "CSSRule", 0, &DOMCSSRuleTable, 0 };
-const ClassInfo DOMCSSRule::style_info = { "CSSStyleRule", &DOMCSSRule::info, &DOMCSSStyleRuleTable, 0 };
-const ClassInfo DOMCSSRule::media_info = { "CSSMediaRule", &DOMCSSRule::info, &DOMCSSMediaRuleTable, 0 };
-const ClassInfo DOMCSSRule::fontface_info = { "CSSFontFaceRule", &DOMCSSRule::info, &DOMCSSFontFaceRuleTable, 0 };
-const ClassInfo DOMCSSRule::page_info = { "CSSPageRule", &DOMCSSRule::info, &DOMCSSPageRuleTable, 0 };
-const ClassInfo DOMCSSRule::import_info = { "CSSImportRule", &DOMCSSRule::info, &DOMCSSImportRuleTable, 0 };
-const ClassInfo DOMCSSRule::charset_info = { "CSSCharsetRule", &DOMCSSRule::info, &DOMCSSCharsetRuleTable, 0 };
+const ClassInfo DOMCSSRule::info = { "CSSRule", nullptr, &DOMCSSRuleTable, nullptr };
+const ClassInfo DOMCSSRule::style_info = { "CSSStyleRule", &DOMCSSRule::info, &DOMCSSStyleRuleTable, nullptr };
+const ClassInfo DOMCSSRule::media_info = { "CSSMediaRule", &DOMCSSRule::info, &DOMCSSMediaRuleTable, nullptr };
+const ClassInfo DOMCSSRule::fontface_info = { "CSSFontFaceRule", &DOMCSSRule::info, &DOMCSSFontFaceRuleTable, nullptr };
+const ClassInfo DOMCSSRule::page_info = { "CSSPageRule", &DOMCSSRule::info, &DOMCSSPageRuleTable, nullptr };
+const ClassInfo DOMCSSRule::import_info = { "CSSImportRule", &DOMCSSRule::info, &DOMCSSImportRuleTable, nullptr };
+const ClassInfo DOMCSSRule::charset_info = { "CSSCharsetRule", &DOMCSSRule::info, &DOMCSSCharsetRuleTable, nullptr };
 
 const ClassInfo* DOMCSSRule::classInfo() const
 {
@@ -853,7 +853,7 @@ DOM::CSSRule toCSSRule(const Value& val)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo CSSRuleConstructor::info = { "CSSRuleConstructor", 0, &CSSRuleConstructorTable, 0 };
+const ClassInfo CSSRuleConstructor::info = { "CSSRuleConstructor", nullptr, &CSSRuleConstructorTable, nullptr };
 /*
 @begin CSSRuleConstructorTable 7
   UNKNOWN_RULE	CSSRuleConstructor::UNKNOWN_RULE	DontDelete|ReadOnly
@@ -904,7 +904,7 @@ Value getCSSRuleConstructor(ExecState *exec)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMCSSValue::info = { "CSSValue", 0, &DOMCSSValueTable, 0 };
+const ClassInfo DOMCSSValue::info = { "CSSValue", nullptr, &DOMCSSValueTable, nullptr };
 
 /*
 @begin DOMCSSValueTable 2
@@ -962,7 +962,7 @@ Value getDOMCSSValue(ExecState *exec, const DOM::CSSValue& v)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo CSSValueConstructor::info = { "CSSValueConstructor", 0, &CSSValueConstructorTable, 0 };
+const ClassInfo CSSValueConstructor::info = { "CSSValueConstructor", nullptr, &CSSValueConstructorTable, nullptr };
 /*
 @begin CSSValueConstructorTable 5
   CSS_INHERIT		CSSValueConstructor::CSS_INHERIT		DontDelete|ReadOnly
@@ -1004,7 +1004,7 @@ Value getCSSValueConstructor(ExecState *exec)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMCSSPrimitiveValue::info = { "CSSPrimitiveValue", 0, &DOMCSSPrimitiveValueTable, 0 };
+const ClassInfo DOMCSSPrimitiveValue::info = { "CSSPrimitiveValue", nullptr, &DOMCSSPrimitiveValueTable, nullptr };
 /*
 @begin DOMCSSPrimitiveValueTable 1
   primitiveType		DOMCSSPrimitiveValue::PrimitiveType	DontDelete|ReadOnly
@@ -1061,7 +1061,7 @@ Value DOMCSSPrimitiveValueProtoFunc::tryCall(ExecState *exec, Object &thisObj, c
 
 // -------------------------------------------------------------------------
 
-const ClassInfo CSSPrimitiveValueConstructor::info = { "CSSPrimitiveValueConstructor", 0, &CSSPrimitiveValueConstructorTable, 0 };
+const ClassInfo CSSPrimitiveValueConstructor::info = { "CSSPrimitiveValueConstructor", nullptr, &CSSPrimitiveValueConstructorTable, nullptr };
 
 /*
 @begin CSSPrimitiveValueConstructorTable 27
@@ -1112,7 +1112,7 @@ Value getCSSPrimitiveValueConstructor(ExecState *exec)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMCSSValueList::info = { "CSSValueList", 0, &DOMCSSValueListTable, 0 };
+const ClassInfo DOMCSSValueList::info = { "CSSValueList", nullptr, &DOMCSSValueListTable, nullptr };
 
 /*
 @begin DOMCSSValueListTable 3
@@ -1157,7 +1157,7 @@ Value DOMCSSValueListFunc::tryCall(ExecState *exec, Object &thisObj, const List
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMRGBColor::info = { "RGBColor", 0, &DOMRGBColorTable, 0 };
+const ClassInfo DOMRGBColor::info = { "RGBColor", nullptr, &DOMRGBColorTable, nullptr };
 
 /*
 @begin DOMRGBColorTable 3
@@ -1206,7 +1206,7 @@ Value getDOMRGBColor(ExecState *exec, const DOM::RGBColor& c)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMRect::info = { "Rect", 0, &DOMRectTable, 0 };
+const ClassInfo DOMRect::info = { "Rect", nullptr, &DOMRectTable, nullptr };
 /*
 @begin DOMRectTable 4
   top	DOMRect::Top	DontDelete|ReadOnly
@@ -1255,7 +1255,7 @@ Value getDOMRect(ExecState *exec, const DOM::Rect& r)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMCounter::info = { "Counter", 0, &DOMCounterTable, 0 };
+const ClassInfo DOMCounter::info = { "Counter", nullptr, &DOMCounterTable, nullptr };
 /*
 @begin DOMCounterTable 3
   identifier	DOMCounter::identifier	DontDelete|ReadOnly
diff --git a/tdehtml/ecma/kjs_debugwin.cpp b/tdehtml/ecma/kjs_debugwin.cpp
index afeac6132..26fc6614b 100644
--- a/tdehtml/ecma/kjs_debugwin.cpp
+++ b/tdehtml/ecma/kjs_debugwin.cpp
@@ -76,7 +76,7 @@ using namespace KJS;
 using namespace tdehtml;
 
 SourceDisplay::SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char *name)
-  : TQScrollView(parent,name), m_currentLine(-1), m_sourceFile(0), m_debugWin(debugWin),
+  : TQScrollView(parent,name), m_currentLine(-1), m_sourceFile(nullptr), m_debugWin(debugWin),
     m_font(TDEGlobalSettings::fixedFont())
 {
   verticalScrollBar()->setLineStep(TQFontMetrics(m_font).height());
@@ -88,7 +88,7 @@ SourceDisplay::~SourceDisplay()
 {
   if (m_sourceFile) {
     m_sourceFile->deref();
-    m_sourceFile = 0L;
+    m_sourceFile = nullptr;
   }
 }
 
@@ -244,7 +244,7 @@ void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw,
 
 //-------------------------------------------------------------------------
 
-KJSDebugWin * KJSDebugWin::kjs_html_debugger = 0;
+KJSDebugWin * KJSDebugWin::kjs_html_debugger = nullptr;
 
 TQString SourceFile::getCode()
 {
@@ -282,13 +282,13 @@ SourceFragment::SourceFragment(int sid, int bl, int el, SourceFile *sf)
 SourceFragment::~SourceFragment()
 {
   sourceFile->deref();
-  sourceFile = 0L;
+  sourceFile = nullptr;
 }
 
 //-------------------------------------------------------------------------
 
 KJSErrorDialog::KJSErrorDialog(TQWidget *parent, const TQString& errorMessage, bool showDebug)
-  : KDialogBase(parent,0,true,i18n("JavaScript Error"),
+  : KDialogBase(parent,nullptr,true,i18n("JavaScript Error"),
 		showDebug ? KDialogBase::Ok|KDialogBase::User1 : KDialogBase::Ok,
 		KDialogBase::Ok,false,KGuiItem("&Debug","gear"))
 {
@@ -298,7 +298,7 @@ KJSErrorDialog::KJSErrorDialog(TQWidget *parent, const TQString& errorMessage, b
   TQLabel *iconLabel = new TQLabel("",page);
   iconLabel->setPixmap(TDEGlobal::iconLoader()->loadIcon("messagebox_critical",
 						       TDEIcon::NoGroup,TDEIcon::SizeMedium,
-						       TDEIcon::DefaultState,0,true));
+						       TDEIcon::DefaultState,nullptr,true));
 
   TQWidget *contents = new TQWidget(page);
   TQLabel *label = new TQLabel(errorMessage,contents);
@@ -349,14 +349,14 @@ void EvalMultiLineEdit::keyPressEvent(TQKeyEvent * e)
 KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name)
   : TDEMainWindow(parent, name, (WFlags)WType_TopLevel), TDEInstance("kjs_debugger")
 {
-  m_breakpoints = 0;
+  m_breakpoints = nullptr;
   m_breakpointCount = 0;
 
-  m_curSourceFile = 0;
+  m_curSourceFile = nullptr;
   m_mode = Continue;
   m_nextSourceUrl = "";
   m_nextSourceBaseLine = 1;
-  m_execs = 0;
+  m_execs = nullptr;
   m_execsCount = 0;
   m_execsAlloc = 0;
   m_steppingDepth = 0;
@@ -708,7 +708,7 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId,
                                const KJS::UString &source, int errorLine)
 {
   // Work out which source file this fragment is in
-  SourceFile *sourceFile = 0;
+  SourceFile *sourceFile = nullptr;
   if (!m_nextSourceUrl.isEmpty())
     sourceFile = getSourceFile(exec->interpreter(),m_nextSourceUrl);
 
@@ -956,7 +956,7 @@ void KJSDebugWin::clearInterpreter(Interpreter *interpreter)
 
   for (it = m_sourceFragments.begin(); it != m_sourceFragments.end(); ++it)
     if (it.data() && it.data()->sourceFile->interpreter == interpreter)
-      it.data()->sourceFile->interpreter = 0;
+      it.data()->sourceFile->interpreter = nullptr;
 }
 
 SourceFile *KJSDebugWin::getSourceFile(Interpreter *interpreter, TQString url)
diff --git a/tdehtml/ecma/kjs_debugwin.h b/tdehtml/ecma/kjs_debugwin.h
index a40b20c2f..b58593f6b 100644
--- a/tdehtml/ecma/kjs_debugwin.h
+++ b/tdehtml/ecma/kjs_debugwin.h
@@ -124,7 +124,7 @@ namespace KJS {
   class SourceDisplay : public TQScrollView {
     TQ_OBJECT
   public:
-    SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char *name = 0);
+    SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char *name = nullptr);
     ~SourceDisplay();
 
     void setSource(SourceFile *sourceFile);
@@ -162,7 +162,7 @@ namespace KJS {
     TQ_OBJECT
     friend class SourceDisplay;
   public:
-    KJSDebugWin(TQWidget *parent=0, const char *name=0);
+    KJSDebugWin(TQWidget *parent=nullptr, const char *name=nullptr);
     virtual ~KJSDebugWin();
 
     static KJSDebugWin *createInstance();
diff --git a/tdehtml/ecma/kjs_dom.cpp b/tdehtml/ecma/kjs_dom.cpp
index 1f73dd9fe..e3c3addd3 100644
--- a/tdehtml/ecma/kjs_dom.cpp
+++ b/tdehtml/ecma/kjs_dom.cpp
@@ -89,7 +89,7 @@ IMPLEMENT_CONSTANT_TABLE(DOMNodeConstants,"DOMNodeConstants")
 IMPLEMENT_PROTOFUNC_DOM(DOMNodeProtoFunc)
 KJS_IMPLEMENT_PROTOTYPE("DOMNode", DOMNodeProto, DOMNodeProtoFunc)
 
-const ClassInfo DOMNode::info = { "Node", 0, &DOMNodeTable, 0 };
+const ClassInfo DOMNode::info = { "Node", nullptr, &DOMNodeTable, nullptr };
 
 DOMNode::DOMNode(ExecState *exec, const DOM::Node& n)
   : DOMObject(DOMNodeProto::self(exec)), node(n)
@@ -186,7 +186,7 @@ static tdehtml::RenderObject* handleBodyRootQuirk(const DOM::Node& node, tdehtml
 {
   //This emulates the quirks of various height/width properties on the viewport and root. Note that it 
   //is (mostly) IE-compatible in quirks, and mozilla-compatible in strict.
-  if (!rend) return 0;
+  if (!rend) return nullptr;
 
   bool quirksMode = rend->style() && rend->style()->htmlHacks();
   
@@ -343,8 +343,8 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
       return rend ? static_cast<Value>(  Number( rend->offsetHeight() ) ) : Number(0);
     case OffsetParent:
     {
-      tdehtml::RenderObject* par = rend ? rend->offsetParent() : 0;
-      return getDOMNode( exec, par ? par->element() : 0 );
+      tdehtml::RenderObject* par = rend ? rend->offsetParent() : nullptr;
+      return getDOMNode( exec, par ? par->element() : nullptr );
     }
     case ClientWidth:
       return rend ? static_cast<Value>( Number( rend->clientWidth() ) ) : Number(0);
@@ -473,7 +473,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
     if (docimpl)
       docimpl->updateLayout();
 
-    tdehtml::RenderObject *rend = node.handle() ? node.handle()->renderer() : 0L;
+    tdehtml::RenderObject *rend = node.handle() ? node.handle()->renderer() : nullptr;
 
     //In quirks mode, may need to forward.
     rend = handleBodyRootQuirk(node, rend, token);
@@ -649,7 +649,7 @@ IMPLEMENT_PROTOFUNC_DOM(DOMNodeListProtoFunc)
 KJS_IMPLEMENT_PROTOTYPE("DOMNodeList", DOMNodeListProto, DOMNodeListProtoFunc)
 
 
-const ClassInfo DOMNodeList::info = { "NodeList", 0, 0, 0 };
+const ClassInfo DOMNodeList::info = { "NodeList", nullptr, nullptr, nullptr };
 
 DOMNodeList::DOMNodeList(ExecState *exec, const DOM::NodeList& l)
  : DOMObject(DOMNodeListProto::self(exec)), list(l) { }
@@ -808,7 +808,7 @@ Value DOMNodeListProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
 // -------------------------------------------------------------------------
 
 //### FIXME: link to the node prototype.
-const ClassInfo DOMAttr::info = { "Attr", &DOMNode::info, &DOMAttrTable, 0 };
+const ClassInfo DOMAttr::info = { "Attr", &DOMNode::info, &DOMAttrTable, nullptr };
 
 /* Source for DOMAttrTable.
 @begin DOMAttrTable 5
@@ -894,7 +894,7 @@ IMPLEMENT_PROTOFUNC_DOM(DOMDocumentProtoFunc)
 KJS_IMPLEMENT_PROTOTYPE("DOMDocument", DOMDocumentProto, DOMDocumentProtoFunc)
 IMPLEMENT_PSEUDO_CONSTRUCTOR(DocumentPseudoCtor, "Document", DOMDocumentProto)
 
-const ClassInfo DOMDocument::info = { "Document", &DOMNode::info, &DOMDocumentTable, 0 };
+const ClassInfo DOMDocument::info = { "Document", &DOMNode::info, &DOMDocumentTable, nullptr };
 
 /* Source for DOMDocumentTable.
 @begin DOMDocumentTable 4
@@ -1144,7 +1144,7 @@ KJS_IMPLEMENT_PROTOTYPE("DOMElement", DOMElementProto, DOMElementProtoFunc)
 
 IMPLEMENT_PSEUDO_CONSTRUCTOR(ElementPseudoCtor, "Element", DOMElementProto)
 
-const ClassInfo DOMElement::info = { "Element", &DOMNode::info, &DOMElementTable, 0 };
+const ClassInfo DOMElement::info = { "Element", &DOMNode::info, &DOMElementTable, nullptr };
 /* Source for DOMElementTable.
 @begin DOMElementTable 3
   tagName	DOMElement::TagName                         DontDelete|ReadOnly
@@ -1256,7 +1256,7 @@ KJS_DEFINE_PROTOTYPE(DOMDOMImplementationProto)
 IMPLEMENT_PROTOFUNC_DOM(DOMDOMImplementationProtoFunc)
 KJS_IMPLEMENT_PROTOTYPE("DOMImplementation", DOMDOMImplementationProto, DOMDOMImplementationProtoFunc)
 
-const ClassInfo DOMDOMImplementation::info = { "DOMImplementation", 0, 0, 0 };
+const ClassInfo DOMDOMImplementation::info = { "DOMImplementation", nullptr, nullptr, nullptr };
 
 DOMDOMImplementation::DOMDOMImplementation(ExecState *exec, const DOM::DOMImplementation& i)
   : DOMObject(DOMDOMImplementationProto::self(exec)), implementation(i) { }
@@ -1300,7 +1300,7 @@ Value DOMDOMImplementationProtoFunc::tryCall(ExecState *exec, Object &thisObj, c
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMDocumentType::info = { "DocumentType", &DOMNode::info, &DOMDocumentTypeTable, 0 };
+const ClassInfo DOMDocumentType::info = { "DocumentType", &DOMNode::info, &DOMDocumentTypeTable, nullptr };
 
 /* Source for DOMDocumentTypeTable.
 @begin DOMDocumentTypeTable 6
@@ -1367,7 +1367,7 @@ KJS_DEFINE_PROTOTYPE(DOMNamedNodeMapProto)
 IMPLEMENT_PROTOFUNC_DOM(DOMNamedNodeMapProtoFunc)
 KJS_IMPLEMENT_PROTOTYPE("NamedNodeMap", DOMNamedNodeMapProto, DOMNamedNodeMapProtoFunc)
 
-const ClassInfo DOMNamedNodeMap::info = { "NamedNodeMap", 0, &DOMNamedNodeMapTable, 0 };
+const ClassInfo DOMNamedNodeMap::info = { "NamedNodeMap", nullptr, &DOMNamedNodeMapTable, nullptr };
 
 DOMNamedNodeMap::DOMNamedNodeMap(ExecState *exec, const DOM::NamedNodeMap& m)
   : DOMObject(DOMNamedNodeMapProto::self(exec)), map(m) { }
@@ -1427,7 +1427,7 @@ Value DOMNamedNodeMapProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
 
 // -------------------------------------------------------------------------
 //### FIXME: proto
-const ClassInfo DOMProcessingInstruction::info = { "ProcessingInstruction", &DOMNode::info, &DOMProcessingInstructionTable, 0 };
+const ClassInfo DOMProcessingInstruction::info = { "ProcessingInstruction", &DOMNode::info, &DOMProcessingInstructionTable, nullptr };
 
 /* Source for DOMProcessingInstructionTable.
 @begin DOMProcessingInstructionTable 3
@@ -1467,7 +1467,7 @@ void DOMProcessingInstruction::tryPut(ExecState *exec, const Identifier &propert
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMNotation::info = { "Notation", &DOMNode::info, &DOMNotationTable, 0 };
+const ClassInfo DOMNotation::info = { "Notation", &DOMNode::info, &DOMNotationTable, nullptr };
 
 /* Source for DOMNotationTable.
 @begin DOMNotationTable 2
@@ -1495,7 +1495,7 @@ Value DOMNotation::getValueProperty(ExecState *, int token) const
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMEntity::info = { "Entity", &DOMNode::info, 0, 0 };
+const ClassInfo DOMEntity::info = { "Entity", &DOMNode::info, nullptr, nullptr };
 
 /* Source for DOMEntityTable.
 @begin DOMEntityTable 2
@@ -1532,7 +1532,7 @@ bool checkNodeSecurity(ExecState *exec, const DOM::Node& n)
   if (n.isNull())
     return true;
   TDEHTMLView *view = n.handle()->getDocument()->view();
-  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
+  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : nullptr;
   if ( !win || !win->isSafeScript(exec) )
     return false;
   return true;
@@ -1540,7 +1540,7 @@ bool checkNodeSecurity(ExecState *exec, const DOM::Node& n)
 
 Value getDOMNode(ExecState *exec, const DOM::Node& n)
 {
-  DOMObject *ret = 0;
+  DOMObject *ret = nullptr;
   if (n.isNull())
     return Null();
   ScriptInterpreter* interp = static_cast<ScriptInterpreter *>(exec->interpreter());
@@ -1615,7 +1615,7 @@ Value getDOMDOMImplementation(ExecState *exec, const DOM::DOMImplementation& i)
 IMPLEMENT_PSEUDO_CONSTRUCTOR_WITH_PARENT(NodeConstructor, "NodeConstructor", DOMNodeProto, DOMNodeConstants)
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMExceptionConstructor::info = { "DOMExceptionConstructor", 0, 0, 0 };
+const ClassInfo DOMExceptionConstructor::info = { "DOMExceptionConstructor", nullptr, nullptr, nullptr };
 
 /* Source for DOMExceptionConstructorTable.
 @begin DOMExceptionConstructorTable 15
@@ -1702,7 +1702,7 @@ Object getDOMExceptionConstructor(ExecState *exec)
   length		KJS::DOMNamedNodesCollection::Length		DontDelete|ReadOnly
 @end
 */
-const ClassInfo KJS::DOMNamedNodesCollection::info = { "DOMNamedNodesCollection", 0, &DOMNamedNodesCollectionTable, 0 };
+const ClassInfo KJS::DOMNamedNodesCollection::info = { "DOMNamedNodesCollection", nullptr, &DOMNamedNodesCollectionTable, nullptr };
 
 // Such a collection is usually very short-lived, it only exists
 // for constructs like document.forms.<name>[1],
@@ -1732,7 +1732,7 @@ Value DOMNamedNodesCollection::tryGet(ExecState *exec, const Identifier &propert
 // -------------------------------------------------------------------------
 
 const ClassInfo DOMCharacterData::info = { "CharacterImp",
-					  &DOMNode::info, &DOMCharacterDataTable, 0 };
+					  &DOMNode::info, &DOMCharacterDataTable, nullptr };
 /*
 @begin DOMCharacterDataTable 2
   data		DOMCharacterData::Data		DontDelete
@@ -1817,7 +1817,7 @@ Value DOMCharacterDataProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
 // -------------------------------------------------------------------------
 
 const ClassInfo DOMText::info = { "Text",
-				 &DOMCharacterData::info, 0, 0 };
+				 &DOMCharacterData::info, nullptr, nullptr };
 /*
 @begin DOMTextProtoTable 1
   splitText	DOMText::SplitText	DontDelete|Function 1
diff --git a/tdehtml/ecma/kjs_events.cpp b/tdehtml/ecma/kjs_events.cpp
index 825cd4107..c8f3d59f8 100644
--- a/tdehtml/ecma/kjs_events.cpp
+++ b/tdehtml/ecma/kjs_events.cpp
@@ -63,7 +63,7 @@ void JSEventListener::handleEvent(DOM::Event &evt)
     return;
 #endif
   TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part());
-  KJSProxy *proxy = 0L;
+  KJSProxy *proxy = nullptr;
   if (part)
     proxy = part->jScript();
 
@@ -95,8 +95,8 @@ void JSEventListener::handleEvent(DOM::Event &evt)
     Value retval = listener.call(exec, thisObj, args);
     guard.stop();
 
-    window->setCurrentEvent( 0 );
-    interpreter->setCurrentEvent( 0 );
+    window->setCurrentEvent( nullptr );
+    interpreter->setCurrentEvent( nullptr );
     if ( exec->hadException() )
       exec->clearException();
     else if (html)
@@ -124,7 +124,7 @@ Object JSEventListener::listenerObj() const
 }
 
 JSLazyEventListener::JSLazyEventListener(const TQString &_code, const TQString &_name, const Object &_win, DOM::NodeImpl* _originalNode)
-  : JSEventListener(Object(), 0, _win, true),
+  : JSEventListener(Object(), nullptr, _win, true),
     code(_code), name(_name),
     parsed(false)
 {
@@ -163,7 +163,7 @@ void JSLazyEventListener::parseCode() const
 {
   if (!parsed) {
     TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(static_cast<Window*>(win.imp())->part());
-    KJSProxy *proxy = 0L;
+    KJSProxy *proxy = nullptr;
     if (part)
       proxy = part->jScript();
 
@@ -223,7 +223,7 @@ void JSLazyEventListener::parseCode() const
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMEvent::info = { "Event", 0, &DOMEventTable, 0 };
+const ClassInfo DOMEvent::info = { "Event", nullptr, &DOMEventTable, nullptr };
 /*
 @begin DOMEventTable 7
   type		DOMEvent::Type		DontDelete|ReadOnly
@@ -414,7 +414,7 @@ IMPLEMENT_PSEUDO_CONSTRUCTOR_WITH_PARENT(EventConstructor, "EventConstructor", D
 // -------------------------------------------------------------------------
 
 
-const ClassInfo EventExceptionConstructor::info = { "EventExceptionConstructor", 0, &EventExceptionConstructorTable, 0 };
+const ClassInfo EventExceptionConstructor::info = { "EventExceptionConstructor", nullptr, &EventExceptionConstructorTable, nullptr };
 /*
 @begin EventExceptionConstructorTable 1
   UNSPECIFIED_EVENT_TYPE_ERR    DOM::EventException::UNSPECIFIED_EVENT_TYPE_ERR DontDelete|ReadOnly
@@ -443,7 +443,7 @@ Value getEventExceptionConstructor(ExecState *exec)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMUIEvent::info = { "UIEvent", &DOMEvent::info, &DOMUIEventTable, 0 };
+const ClassInfo DOMUIEvent::info = { "UIEvent", &DOMEvent::info, &DOMUIEventTable, nullptr };
 /*
 @begin DOMUIEventTable 7
   view		DOMUIEvent::View	DontDelete|ReadOnly
@@ -533,7 +533,7 @@ Value DOMUIEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMMouseEvent::info = { "MouseEvent", &DOMUIEvent::info, &DOMMouseEventTable, 0 };
+const ClassInfo DOMMouseEvent::info = { "MouseEvent", &DOMUIEvent::info, &DOMMouseEventTable, nullptr };
 
 /*
 @begin DOMMouseEventTable 2
@@ -594,7 +594,7 @@ Value DOMMouseEvent::getValueProperty(ExecState *exec, int token) const
   case OffsetY: // MSIE extension
   {
     DOM::Node node = event.target();
-    tdehtml::RenderObject *rend = 0;
+    tdehtml::RenderObject *rend = nullptr;
     if (node.handle()) {
         node.handle()->getDocument()->updateRendering();
         rend = node.handle()->renderer();
@@ -683,7 +683,7 @@ Value DOMMouseEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const Li
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMKeyEventBase::info = { "KeyEventBase", &DOMUIEvent::info, &DOMKeyEventBaseTable, 0 };
+const ClassInfo DOMKeyEventBase::info = { "KeyEventBase", &DOMUIEvent::info, &DOMKeyEventBaseTable, nullptr };
 
 /*
 @begin DOMKeyEventBaseTable 5
@@ -735,7 +735,7 @@ Value DOMKeyEventBase::getValueProperty(ExecState *, int token) const
 }
 
 // -------------------------------------------------------------------------
-const ClassInfo DOMTextEvent::info = { "TextEvent", &DOMKeyEventBase::info, &DOMTextEventTable, 0 };
+const ClassInfo DOMTextEvent::info = { "TextEvent", &DOMKeyEventBase::info, &DOMTextEventTable, nullptr };
 
 /*
 @begin DOMTextEventTable 1
@@ -794,7 +794,7 @@ Value DOMTextEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const Lis
   return Undefined();
 }
 // -------------------------------------------------------------------------
-const ClassInfo DOMKeyboardEvent::info = { "KeyboardEvent", &DOMKeyEventBase::info, &DOMKeyboardEventTable, 0 };
+const ClassInfo DOMKeyboardEvent::info = { "KeyboardEvent", &DOMKeyEventBase::info, &DOMKeyboardEventTable, nullptr };
 
 /*
 @begin DOMKeyboardEventTable 2
@@ -860,7 +860,7 @@ Value DOMKeyboardEventProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
 }
 
 // -------------------------------------------------------------------------
-const ClassInfo KeyboardEventConstructor::info = { "KeyboardEventConstructor", 0, &KeyboardEventConstructorTable, 0 };
+const ClassInfo KeyboardEventConstructor::info = { "KeyboardEventConstructor", nullptr, &KeyboardEventConstructorTable, nullptr };
 /*
 @begin KeyboardEventConstructorTable 4
   DOM_KEY_LOCATION_STANDARD  DOM::KeyboardEventImpl::DOM_KEY_LOCATION_STANDARD DontDelete|ReadOnly
@@ -891,7 +891,7 @@ Value getKeyboardEventConstructor(ExecState *exec)
 
 
 // -------------------------------------------------------------------------
-const ClassInfo MutationEventConstructor::info = { "MutationEventConstructor", 0, &MutationEventConstructorTable, 0 };
+const ClassInfo MutationEventConstructor::info = { "MutationEventConstructor", nullptr, &MutationEventConstructorTable, nullptr };
 /*
 @begin MutationEventConstructorTable 3
   MODIFICATION	DOM::MutationEvent::MODIFICATION	DontDelete|ReadOnly
@@ -922,7 +922,7 @@ Value getMutationEventConstructor(ExecState *exec)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMMutationEvent::info = { "MutationEvent", &DOMEvent::info, &DOMMutationEventTable, 0 };
+const ClassInfo DOMMutationEvent::info = { "MutationEvent", &DOMEvent::info, &DOMMutationEventTable, nullptr };
 /*
 @begin DOMMutationEventTable 5
   relatedNode	DOMMutationEvent::RelatedNode	DontDelete|ReadOnly
diff --git a/tdehtml/ecma/kjs_html.cpp b/tdehtml/ecma/kjs_html.cpp
index f28906cba..b27cd4121 100644
--- a/tdehtml/ecma/kjs_html.cpp
+++ b/tdehtml/ecma/kjs_html.cpp
@@ -151,7 +151,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List
 }
 
 const ClassInfo KJS::HTMLDocument::info =
-  { "HTMLDocument", &DOMDocument::info, &HTMLDocumentTable, 0 };
+  { "HTMLDocument", &DOMDocument::info, &HTMLDocumentTable, nullptr };
 /* Source for HTMLDocumentTable.
 @begin HTMLDocumentTable 31
   title			HTMLDocument::Title		DontDelete
@@ -202,7 +202,7 @@ bool KJS::HTMLDocument::hasProperty(ExecState *exec, const Identifier &p) const
   DOM::HTMLDocument doc = static_cast<DOM::HTMLDocument>(node);
   DOM::DocumentImpl* docImpl = static_cast<DOM::DocumentImpl*>(doc.handle());
   TDEHTMLView *view = docImpl->view();
-  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
+  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : nullptr;
   if ( !win || !win->isSafeScript(exec) )
     return false;
 
@@ -230,7 +230,7 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName)
   DOM::DocumentImpl* docImpl = static_cast<DOM::DocumentImpl*>(doc.handle());
   TDEHTMLView *view = docImpl->view();
 
-  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
+  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : nullptr;
   if ( !win || !win->isSafeScript(exec) )
     return Undefined();
 
@@ -360,7 +360,7 @@ void KJS::HTMLDocument::tryPut(ExecState *exec, const Identifier &propertyName,
 #endif
   TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(node.handle())->view();
 
-  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : 0L;
+  Window* win = view && view->part() ? Window::retrieveWindow(view->part()) : nullptr;
   if ( !win || !win->isSafeScript(exec) )
     return;
 
@@ -426,62 +426,62 @@ void KJS::HTMLDocument::putValueProperty(ExecState *exec, int token, const Value
 
 // -------------------------------------------------------------------------
 
-const ClassInfo KJS::HTMLElement::info = { "HTMLElement", &DOMElement::info, &HTMLElementTable, 0 };
-const ClassInfo KJS::HTMLElement::html_info = { "HTMLHtmlElement", &KJS::HTMLElement::info, &HTMLHtmlElementTable, 0 };
-const ClassInfo KJS::HTMLElement::head_info = { "HTMLHeadElement", &KJS::HTMLElement::info, &HTMLHeadElementTable, 0 };
-const ClassInfo KJS::HTMLElement::link_info = { "HTMLLinkElement", &KJS::HTMLElement::info, &HTMLLinkElementTable, 0 };
-const ClassInfo KJS::HTMLElement::title_info = { "HTMLTitleElement", &KJS::HTMLElement::info, &HTMLTitleElementTable, 0 };
-const ClassInfo KJS::HTMLElement::meta_info = { "HTMLMetaElement", &KJS::HTMLElement::info, &HTMLMetaElementTable, 0 };
-const ClassInfo KJS::HTMLElement::base_info = { "HTMLBaseElement", &KJS::HTMLElement::info, &HTMLBaseElementTable, 0 };
-const ClassInfo KJS::HTMLElement::isIndex_info = { "HTMLIsIndexElement", &KJS::HTMLElement::info, &HTMLIsIndexElementTable, 0 };
-const ClassInfo KJS::HTMLElement::style_info = { "HTMLStyleElement", &KJS::HTMLElement::info, &HTMLStyleElementTable, 0 };
-const ClassInfo KJS::HTMLElement::body_info = { "HTMLBodyElement", &KJS::HTMLElement::info, &HTMLBodyElementTable, 0 };
-const ClassInfo KJS::HTMLElement::form_info = { "HTMLFormElement", &KJS::HTMLElement::info, &HTMLFormElementTable, 0 };
-const ClassInfo KJS::HTMLElement::select_info = { "HTMLSelectElement", &KJS::HTMLElement::info, &HTMLSelectElementTable, 0 };
-const ClassInfo KJS::HTMLElement::optGroup_info = { "HTMLOptGroupElement", &KJS::HTMLElement::info, &HTMLOptGroupElementTable, 0 };
-const ClassInfo KJS::HTMLElement::option_info = { "HTMLOptionElement", &KJS::HTMLElement::info, &HTMLOptionElementTable, 0 };
-const ClassInfo KJS::HTMLElement::input_info = { "HTMLInputElement", &KJS::HTMLElement::info, &HTMLInputElementTable, 0 };
-const ClassInfo KJS::HTMLElement::textArea_info = { "HTMLTextAreaElement", &KJS::HTMLElement::info, &HTMLTextAreaElementTable, 0 };
-const ClassInfo KJS::HTMLElement::button_info = { "HTMLButtonElement", &KJS::HTMLElement::info, &HTMLButtonElementTable, 0 };
-const ClassInfo KJS::HTMLElement::label_info = { "HTMLLabelElement", &KJS::HTMLElement::info, &HTMLLabelElementTable, 0 };
-const ClassInfo KJS::HTMLElement::fieldSet_info = { "HTMLFieldSetElement", &KJS::HTMLElement::info, &HTMLFieldSetElementTable, 0 };
-const ClassInfo KJS::HTMLElement::legend_info = { "HTMLLegendElement", &KJS::HTMLElement::info, &HTMLLegendElementTable, 0 };
-const ClassInfo KJS::HTMLElement::ul_info = { "HTMLUListElement", &KJS::HTMLElement::info, &HTMLUListElementTable, 0 };
-const ClassInfo KJS::HTMLElement::ol_info = { "HTMLOListElement", &KJS::HTMLElement::info, &HTMLOListElementTable, 0 };
-const ClassInfo KJS::HTMLElement::dl_info = { "HTMLDListElement", &KJS::HTMLElement::info, &HTMLDListElementTable, 0 };
-const ClassInfo KJS::HTMLElement::dir_info = { "HTMLDirectoryElement", &KJS::HTMLElement::info, &HTMLDirectoryElementTable, 0 };
-const ClassInfo KJS::HTMLElement::menu_info = { "HTMLMenuElement", &KJS::HTMLElement::info, &HTMLMenuElementTable, 0 };
-const ClassInfo KJS::HTMLElement::li_info = { "HTMLLIElement", &KJS::HTMLElement::info, &HTMLLIElementTable, 0 };
-const ClassInfo KJS::HTMLElement::div_info = { "HTMLDivElement", &KJS::HTMLElement::info, &HTMLDivElementTable, 0 };
-const ClassInfo KJS::HTMLElement::p_info = { "HTMLParagraphElement", &KJS::HTMLElement::info, &HTMLParagraphElementTable, 0 };
-const ClassInfo KJS::HTMLElement::heading_info = { "HTMLHeadingElement", &KJS::HTMLElement::info, &HTMLHeadingElementTable, 0 };
-const ClassInfo KJS::HTMLElement::blockQuote_info = { "HTMLBlockQuoteElement", &KJS::HTMLElement::info, &HTMLBlockQuoteElementTable, 0 };
-const ClassInfo KJS::HTMLElement::q_info = { "HTMLQuoteElement", &KJS::HTMLElement::info, &HTMLQuoteElementTable, 0 };
-const ClassInfo KJS::HTMLElement::pre_info = { "HTMLPreElement", &KJS::HTMLElement::info, &HTMLPreElementTable, 0 };
-const ClassInfo KJS::HTMLElement::br_info = { "HTMLBRElement", &KJS::HTMLElement::info, &HTMLBRElementTable, 0 };
-const ClassInfo KJS::HTMLElement::baseFont_info = { "HTMLBaseFontElement", &KJS::HTMLElement::info, &HTMLBaseFontElementTable, 0 };
-const ClassInfo KJS::HTMLElement::font_info = { "HTMLFontElement", &KJS::HTMLElement::info, &HTMLFontElementTable, 0 };
-const ClassInfo KJS::HTMLElement::hr_info = { "HTMLHRElement", &KJS::HTMLElement::info, &HTMLHRElementTable, 0 };
-const ClassInfo KJS::HTMLElement::mod_info = { "HTMLModElement", &KJS::HTMLElement::info, &HTMLModElementTable, 0 };
-const ClassInfo KJS::HTMLElement::a_info = { "HTMLAnchorElement", &KJS::HTMLElement::info, &HTMLAnchorElementTable, 0 };
-const ClassInfo KJS::HTMLElement::img_info = { "HTMLImageElement", &KJS::HTMLElement::info, &HTMLImageElementTable, 0 };
-const ClassInfo KJS::HTMLElement::object_info = { "HTMLObjectElement", &KJS::HTMLElement::info, &HTMLObjectElementTable, 0 };
-const ClassInfo KJS::HTMLElement::param_info = { "HTMLParamElement", &KJS::HTMLElement::info, &HTMLParamElementTable, 0 };
-const ClassInfo KJS::HTMLElement::applet_info = { "HTMLAppletElement", &KJS::HTMLElement::info, &HTMLAppletElementTable, 0 };
-const ClassInfo KJS::HTMLElement::map_info = { "HTMLMapElement", &KJS::HTMLElement::info, &HTMLMapElementTable, 0 };
-const ClassInfo KJS::HTMLElement::area_info = { "HTMLAreaElement", &KJS::HTMLElement::info, &HTMLAreaElementTable, 0 };
-const ClassInfo KJS::HTMLElement::script_info = { "HTMLScriptElement", &KJS::HTMLElement::info, &HTMLScriptElementTable, 0 };
-const ClassInfo KJS::HTMLElement::table_info = { "HTMLTableElement", &KJS::HTMLElement::info, &HTMLTableElementTable, 0 };
-const ClassInfo KJS::HTMLElement::caption_info = { "HTMLTableCaptionElement", &KJS::HTMLElement::info, &HTMLTableCaptionElementTable, 0 };
-const ClassInfo KJS::HTMLElement::col_info = { "HTMLTableColElement", &KJS::HTMLElement::info, &HTMLTableColElementTable, 0 };
-const ClassInfo KJS::HTMLElement::tablesection_info = { "HTMLTableSectionElement", &KJS::HTMLElement::info, &HTMLTableSectionElementTable, 0 };
-const ClassInfo KJS::HTMLElement::tr_info = { "HTMLTableRowElement", &KJS::HTMLElement::info, &HTMLTableRowElementTable, 0 };
-const ClassInfo KJS::HTMLElement::tablecell_info = { "HTMLTableCellElement", &KJS::HTMLElement::info, &HTMLTableCellElementTable, 0 };
-const ClassInfo KJS::HTMLElement::frameSet_info = { "HTMLFrameSetElement", &KJS::HTMLElement::info, &HTMLFrameSetElementTable, 0 };
-const ClassInfo KJS::HTMLElement::frame_info = { "HTMLFrameElement", &KJS::HTMLElement::info, &HTMLFrameElementTable, 0 };
-const ClassInfo KJS::HTMLElement::iFrame_info = { "HTMLIFrameElement", &KJS::HTMLElement::info, &HTMLIFrameElementTable, 0 };
-const ClassInfo KJS::HTMLElement::marquee_info = { "HTMLMarqueeElement", &KJS::HTMLElement::info, 0, 0 };
-const ClassInfo KJS::HTMLElement::layer_info = { "HTMLLayerElement", &KJS::HTMLElement::info, &HTMLLayerElementTable, 0 };
+const ClassInfo KJS::HTMLElement::info = { "HTMLElement", &DOMElement::info, &HTMLElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::html_info = { "HTMLHtmlElement", &KJS::HTMLElement::info, &HTMLHtmlElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::head_info = { "HTMLHeadElement", &KJS::HTMLElement::info, &HTMLHeadElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::link_info = { "HTMLLinkElement", &KJS::HTMLElement::info, &HTMLLinkElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::title_info = { "HTMLTitleElement", &KJS::HTMLElement::info, &HTMLTitleElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::meta_info = { "HTMLMetaElement", &KJS::HTMLElement::info, &HTMLMetaElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::base_info = { "HTMLBaseElement", &KJS::HTMLElement::info, &HTMLBaseElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::isIndex_info = { "HTMLIsIndexElement", &KJS::HTMLElement::info, &HTMLIsIndexElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::style_info = { "HTMLStyleElement", &KJS::HTMLElement::info, &HTMLStyleElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::body_info = { "HTMLBodyElement", &KJS::HTMLElement::info, &HTMLBodyElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::form_info = { "HTMLFormElement", &KJS::HTMLElement::info, &HTMLFormElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::select_info = { "HTMLSelectElement", &KJS::HTMLElement::info, &HTMLSelectElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::optGroup_info = { "HTMLOptGroupElement", &KJS::HTMLElement::info, &HTMLOptGroupElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::option_info = { "HTMLOptionElement", &KJS::HTMLElement::info, &HTMLOptionElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::input_info = { "HTMLInputElement", &KJS::HTMLElement::info, &HTMLInputElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::textArea_info = { "HTMLTextAreaElement", &KJS::HTMLElement::info, &HTMLTextAreaElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::button_info = { "HTMLButtonElement", &KJS::HTMLElement::info, &HTMLButtonElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::label_info = { "HTMLLabelElement", &KJS::HTMLElement::info, &HTMLLabelElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::fieldSet_info = { "HTMLFieldSetElement", &KJS::HTMLElement::info, &HTMLFieldSetElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::legend_info = { "HTMLLegendElement", &KJS::HTMLElement::info, &HTMLLegendElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::ul_info = { "HTMLUListElement", &KJS::HTMLElement::info, &HTMLUListElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::ol_info = { "HTMLOListElement", &KJS::HTMLElement::info, &HTMLOListElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::dl_info = { "HTMLDListElement", &KJS::HTMLElement::info, &HTMLDListElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::dir_info = { "HTMLDirectoryElement", &KJS::HTMLElement::info, &HTMLDirectoryElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::menu_info = { "HTMLMenuElement", &KJS::HTMLElement::info, &HTMLMenuElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::li_info = { "HTMLLIElement", &KJS::HTMLElement::info, &HTMLLIElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::div_info = { "HTMLDivElement", &KJS::HTMLElement::info, &HTMLDivElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::p_info = { "HTMLParagraphElement", &KJS::HTMLElement::info, &HTMLParagraphElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::heading_info = { "HTMLHeadingElement", &KJS::HTMLElement::info, &HTMLHeadingElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::blockQuote_info = { "HTMLBlockQuoteElement", &KJS::HTMLElement::info, &HTMLBlockQuoteElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::q_info = { "HTMLQuoteElement", &KJS::HTMLElement::info, &HTMLQuoteElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::pre_info = { "HTMLPreElement", &KJS::HTMLElement::info, &HTMLPreElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::br_info = { "HTMLBRElement", &KJS::HTMLElement::info, &HTMLBRElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::baseFont_info = { "HTMLBaseFontElement", &KJS::HTMLElement::info, &HTMLBaseFontElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::font_info = { "HTMLFontElement", &KJS::HTMLElement::info, &HTMLFontElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::hr_info = { "HTMLHRElement", &KJS::HTMLElement::info, &HTMLHRElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::mod_info = { "HTMLModElement", &KJS::HTMLElement::info, &HTMLModElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::a_info = { "HTMLAnchorElement", &KJS::HTMLElement::info, &HTMLAnchorElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::img_info = { "HTMLImageElement", &KJS::HTMLElement::info, &HTMLImageElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::object_info = { "HTMLObjectElement", &KJS::HTMLElement::info, &HTMLObjectElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::param_info = { "HTMLParamElement", &KJS::HTMLElement::info, &HTMLParamElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::applet_info = { "HTMLAppletElement", &KJS::HTMLElement::info, &HTMLAppletElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::map_info = { "HTMLMapElement", &KJS::HTMLElement::info, &HTMLMapElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::area_info = { "HTMLAreaElement", &KJS::HTMLElement::info, &HTMLAreaElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::script_info = { "HTMLScriptElement", &KJS::HTMLElement::info, &HTMLScriptElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::table_info = { "HTMLTableElement", &KJS::HTMLElement::info, &HTMLTableElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::caption_info = { "HTMLTableCaptionElement", &KJS::HTMLElement::info, &HTMLTableCaptionElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::col_info = { "HTMLTableColElement", &KJS::HTMLElement::info, &HTMLTableColElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::tablesection_info = { "HTMLTableSectionElement", &KJS::HTMLElement::info, &HTMLTableSectionElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::tr_info = { "HTMLTableRowElement", &KJS::HTMLElement::info, &HTMLTableRowElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::tablecell_info = { "HTMLTableCellElement", &KJS::HTMLElement::info, &HTMLTableCellElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::frameSet_info = { "HTMLFrameSetElement", &KJS::HTMLElement::info, &HTMLFrameSetElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::frame_info = { "HTMLFrameElement", &KJS::HTMLElement::info, &HTMLFrameElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::iFrame_info = { "HTMLIFrameElement", &KJS::HTMLElement::info, &HTMLIFrameElementTable, nullptr };
+const ClassInfo KJS::HTMLElement::marquee_info = { "HTMLMarqueeElement", &KJS::HTMLElement::info, nullptr, nullptr };
+const ClassInfo KJS::HTMLElement::layer_info = { "HTMLLayerElement", &KJS::HTMLElement::info, &HTMLLayerElementTable, nullptr };
 
 static Object prototypeForID(ExecState* exec, DOM::NodeImpl::Id id);
 
@@ -1132,7 +1132,7 @@ static KParts::LiveConnectExtension *getLiveConnectExtension(const DOM::HTMLElem
   TDEHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
   if (view && element.handle())
     return view->part()->liveConnectExtension(static_cast<tdehtml::RenderPart*>(element.handle()->renderer()));
-  return 0L;
+  return nullptr;
 }
 
 Value KJS::HTMLElement::tryGet(ExecState *exec, const Identifier &propertyName) const
@@ -1181,7 +1181,7 @@ Value KJS::HTMLElement::tryGet(ExecState *exec, const Identifier &propertyName)
   }
 
   const HashTable* table = classInfo()->propHashTable; // get the right hashtable
-  const HashEntry* entry = table ? Lookup::findEntry(table, propertyName) : 0;
+  const HashEntry* entry = table ? Lookup::findEntry(table, propertyName) : nullptr;
   if (entry) {
     if (entry->attr & Function)
       return lookupOrCreateFunction<KJS::HTMLElementFunction>(exec, propertyName, this, entry->value, entry->params, entry->attr);
@@ -2149,7 +2149,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
               caption = view->part()->url().host() + " - ";
             // search all (possibly nested) framesets
             TDEHTMLPart *currentPart = view->part()->parentPart();
-            while( currentPart != 0L ) {
+            while( currentPart ) {
               if( currentPart->frameExists( form.target().string() ) )
                 block = false;
               currentPart = currentPart->parentPart();
@@ -2192,7 +2192,7 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
       if (id == KJS::HTMLElement::BodyFocus) {
         // Just blur everything. Not perfect, but good enough for now
         if (DOM::NodeImpl* impl = element.handle()) {
-          impl->getDocument()->setFocusNode(0);
+          impl->getDocument()->setFocusNode(nullptr);
         }
       }
     }
@@ -2406,7 +2406,7 @@ void KJS::HTMLElement::tryPut(ExecState *exec, const Identifier &propertyName, c
   }
 
   const HashTable* table = classInfo()->propHashTable; // get the right hashtable
-  const HashEntry* entry = table ? Lookup::findEntry(table, propertyName) : 0;
+  const HashEntry* entry = table ? Lookup::findEntry(table, propertyName) : nullptr;
   if (entry) {
     if (entry->attr & Function) // function: put as override property
     {
@@ -3451,7 +3451,7 @@ KJS_DEFINE_PROTOTYPE(HTMLCollectionProto)
 IMPLEMENT_PROTOFUNC_DOM(HTMLCollectionProtoFunc)
 KJS_IMPLEMENT_PROTOTYPE("HTMLCollection", HTMLCollectionProto,HTMLCollectionProtoFunc)
 
-const ClassInfo KJS::HTMLCollection::info = { "HTMLCollection", 0, 0, 0 };
+const ClassInfo KJS::HTMLCollection::info = { "HTMLCollection", nullptr, nullptr, nullptr };
 
 KJS::HTMLCollection::HTMLCollection(ExecState *exec, const DOM::HTMLCollection& c)
   : DOMObject(HTMLCollectionProto::self(exec)), collection(c), hidden(false) {}
@@ -3709,7 +3709,7 @@ KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(HTMLSelectCollectionProto, HTMLCollectionPro
 IMPLEMENT_PROTOFUNC_DOM(HTMLSelectCollectionProtoFunc)
 KJS_IMPLEMENT_PROTOTYPE("HTMLOptionsCollection",  HTMLSelectCollectionProto, HTMLSelectCollectionProtoFunc)
 
-const ClassInfo KJS::HTMLSelectCollection::info = { "HTMLOptionsCollection", &HTMLCollection::info, 0, 0 };
+const ClassInfo KJS::HTMLSelectCollection::info = { "HTMLOptionsCollection", &HTMLCollection::info, nullptr, nullptr };
 
 KJS::HTMLSelectCollection::HTMLSelectCollection(ExecState *exec, const DOM::HTMLCollection& c, 
                                                 const DOM::HTMLSelectElement& e)
diff --git a/tdehtml/ecma/kjs_mozilla.cpp b/tdehtml/ecma/kjs_mozilla.cpp
index 4849c082c..46dbfce40 100644
--- a/tdehtml/ecma/kjs_mozilla.cpp
+++ b/tdehtml/ecma/kjs_mozilla.cpp
@@ -30,7 +30,7 @@ using namespace KJS;
 
 namespace KJS {
 
-const ClassInfo MozillaSidebarExtension::info = { "sidebar", 0, &MozillaSidebarExtensionTable, 0 };
+const ClassInfo MozillaSidebarExtension::info = { "sidebar", nullptr, &MozillaSidebarExtensionTable, nullptr };
 /*
 @begin MozillaSidebarExtensionTable 1
   addPanel	MozillaSidebarExtension::addPanel	DontDelete|Function 0
diff --git a/tdehtml/ecma/kjs_navigator.cpp b/tdehtml/ecma/kjs_navigator.cpp
index c68121f0e..e8c87f18b 100644
--- a/tdehtml/ecma/kjs_navigator.cpp
+++ b/tdehtml/ecma/kjs_navigator.cpp
@@ -137,11 +137,11 @@ namespace KJS {
 }
 
 
-TQPtrList<PluginBase::PluginInfo> *KJS::PluginBase::plugins = 0;
-TQPtrList<PluginBase::MimeClassInfo> *KJS::PluginBase::mimes = 0;
+TQPtrList<PluginBase::PluginInfo> *KJS::PluginBase::plugins = nullptr;
+TQPtrList<PluginBase::MimeClassInfo> *KJS::PluginBase::mimes = nullptr;
 int KJS::PluginBase::m_refCount = 0;
 
-const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
+const ClassInfo Navigator::info = { "Navigator", nullptr, &NavigatorTable, nullptr };
 /*
 @begin NavigatorTable 12
   appCodeName	Navigator::AppCodeName	DontDelete|ReadOnly
@@ -358,15 +358,15 @@ PluginBase::~PluginBase()
     if ( m_refCount==0 ) {
         delete plugins;
         delete mimes;
-        plugins = 0;
-        mimes = 0;
+        plugins = nullptr;
+        mimes = nullptr;
     }
 }
 
 
 /*******************************************************************/
 
-const ClassInfo Plugins::info = { "PluginArray", 0, &PluginsTable, 0 };
+const ClassInfo Plugins::info = { "PluginArray", nullptr, &PluginsTable, nullptr };
 /*
 @begin PluginsTable 4
   length	Plugins_Length  	DontDelete|ReadOnly
@@ -407,7 +407,7 @@ Value Plugins::get(ExecState *exec, const Identifier &propertyName) const
 Value Plugins::pluginByName( ExecState* exec, const TQString& name ) const
 {
   Q_ASSERT(plugins);
-  for ( PluginInfo *pl = plugins->first(); pl!=0; pl = plugins->next() ) {
+  for ( PluginInfo *pl = plugins->first(); pl; pl = plugins->next() ) {
     if ( pl->name == name )
       return Value( new Plugin( exec, pl ) );
   }
@@ -452,7 +452,7 @@ Value PluginsFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 
 /*******************************************************************/
 
-const ClassInfo MimeTypes::info = { "MimeTypeArray", 0, &MimeTypesTable, 0 };
+const ClassInfo MimeTypes::info = { "MimeTypeArray", nullptr, &MimeTypesTable, nullptr };
 /*
 @begin MimeTypesTable 3
   length	MimeTypes_Length  	DontDelete|ReadOnly
@@ -493,7 +493,7 @@ Value MimeTypes::mimeTypeByName( ExecState* exec, const TQString& name ) const
 {
   //kdDebug(6070) << "MimeTypes[" << name << "]" << endl;
   Q_ASSERT(mimes);
-  for ( MimeClassInfo *m = mimes->first(); m!=0; m = mimes->next() ) {
+  for ( MimeClassInfo *m = mimes->first(); m; m = mimes->next() ) {
     if ( m->type == name )
       return Value( new MimeType( exec, m ) );
   }
@@ -534,7 +534,7 @@ Value MimeTypesFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 }
 
 /************************************************************************/
-const ClassInfo Plugin::info = { "Plugin", 0, &PluginTable, 0 };
+const ClassInfo Plugin::info = { "Plugin", nullptr, &PluginTable, nullptr };
 /*
 @begin PluginTable 7
   name  	Plugin_Name	  	DontDelete|ReadOnly
@@ -576,7 +576,7 @@ Value Plugin::get(ExecState *exec, const Identifier &propertyName) const
 Value Plugin::mimeByName(ExecState* exec, const TQString& name) const
 {
   for ( PluginBase::MimeClassInfo *m = m_info->mimes.first();
-        m != 0; m = m_info->mimes.next() ) {
+        m != nullptr; m = m_info->mimes.next() ) {
     if ( m->type == name )
       return Value(new MimeType(exec, m));
   }
@@ -624,7 +624,7 @@ Value PluginFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 
 /*****************************************************************************/
 
-const ClassInfo MimeType::info = { "MimeType", 0, &MimeTypeTable, 0 };
+const ClassInfo MimeType::info = { "MimeType", nullptr, &MimeTypeTable, nullptr };
 /*
 @begin MimeTypeTable 4
   description  	MimeType_Description    	DontDelete|ReadOnly
diff --git a/tdehtml/ecma/kjs_proxy.cpp b/tdehtml/ecma/kjs_proxy.cpp
index 204fb46e2..5b561383a 100644
--- a/tdehtml/ecma/kjs_proxy.cpp
+++ b/tdehtml/ecma/kjs_proxy.cpp
@@ -60,7 +60,7 @@ public:
   KJSProxyImpl(tdehtml::ChildFrame *frame);
   virtual ~KJSProxyImpl();
   virtual TQVariant evaluate(TQString filename, int baseLine, const TQString &, const DOM::Node &n,
-			    Completion *completion = 0);
+			    Completion *completion = nullptr);
   virtual void clear();
   virtual DOM::EventListener *createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl *node);
   virtual void finishedWithEvent(const DOM::Event &event);
@@ -90,7 +90,7 @@ int KJSProxyImpl::s_count = 0;
 
 KJSProxyImpl::KJSProxyImpl(tdehtml::ChildFrame *frame)
 {
-  m_script = 0;
+  m_script = nullptr;
   m_frame = frame;
   m_debugEnabled = false;
 #ifndef NDEBUG
@@ -395,13 +395,13 @@ void KJSCPUGuard::start(unsigned int ms, unsigned int i_ms)
 
 void KJSCPUGuard::stop()
 {
-  setitimer(ITIMER_VIRTUAL, &oldtv, 0L);
+  setitimer(ITIMER_VIRTUAL, &oldtv, nullptr);
   signal(SIGVTALRM, oldAlarmHandler);
 }
 
 bool KJSCPUGuard::confirmTerminate() {
   kdDebug(6070) << "alarmhandler" << endl;
-  return KMessageBox::warningYesNo(0L, i18n("A script on this page is causing TDEHTML to freeze. If it continues to run, other applications may become less responsive.\nDo you want to abort the script?"), i18n("JavaScript"), i18n("&Abort"), KStdGuiItem::cont(), "kjscupguard_alarmhandler") == KMessageBox::Yes;
+  return KMessageBox::warningYesNo(nullptr, i18n("A script on this page is causing TDEHTML to freeze. If it continues to run, other applications may become less responsive.\nDo you want to abort the script?"), i18n("JavaScript"), i18n("&Abort"), KStdGuiItem::cont(), "kjscupguard_alarmhandler") == KMessageBox::Yes;
 }
 
 void KJSCPUGuard::alarmHandler(int) {
diff --git a/tdehtml/ecma/kjs_proxy.h b/tdehtml/ecma/kjs_proxy.h
index 6ccf983cf..b229d3ced 100644
--- a/tdehtml/ecma/kjs_proxy.h
+++ b/tdehtml/ecma/kjs_proxy.h
@@ -55,7 +55,7 @@ public:
   KJSProxy() { m_handlerLineno = 0; }
   virtual ~KJSProxy() { }
   virtual TQVariant evaluate(TQString filename, int baseLine, const TQString &, const DOM::Node &n,
-			    KJS::Completion *completion = 0) = 0;
+			    KJS::Completion *completion = nullptr) = 0;
   virtual void clear() = 0;
   virtual DOM::EventListener *createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl* node) = 0;
   virtual void finishedWithEvent(const DOM::Event &event) = 0;
diff --git a/tdehtml/ecma/kjs_range.cpp b/tdehtml/ecma/kjs_range.cpp
index f69e27c8b..104ef0588 100644
--- a/tdehtml/ecma/kjs_range.cpp
+++ b/tdehtml/ecma/kjs_range.cpp
@@ -26,7 +26,7 @@ namespace KJS {
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMRange::info = { "Range", 0, &DOMRangeTable, 0 };
+const ClassInfo DOMRange::info = { "Range", nullptr, &DOMRangeTable, nullptr };
 /*
 @begin DOMRangeTable 7
   startContainer	DOMRange::StartContainer	DontDelete|ReadOnly
@@ -189,7 +189,7 @@ Value getDOMRange(ExecState *exec, DOM::Range r)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo RangeConstructor::info = { "RangeConstructor", 0, &RangeConstructorTable, 0 };
+const ClassInfo RangeConstructor::info = { "RangeConstructor", nullptr, &RangeConstructorTable, nullptr };
 /*
 @begin RangeConstructorTable 5
   START_TO_START	DOM::Range::START_TO_START	DontDelete|ReadOnly
diff --git a/tdehtml/ecma/kjs_traversal.cpp b/tdehtml/ecma/kjs_traversal.cpp
index 617a2988a..9d39c15bc 100644
--- a/tdehtml/ecma/kjs_traversal.cpp
+++ b/tdehtml/ecma/kjs_traversal.cpp
@@ -31,7 +31,7 @@ namespace KJS {
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMNodeIterator::info = { "NodeIterator", 0, &DOMNodeIteratorTable, 0 };
+const ClassInfo DOMNodeIterator::info = { "NodeIterator", nullptr, &DOMNodeIteratorTable, nullptr };
 /*
 @begin DOMNodeIteratorTable 5
   root				DOMNodeIterator::Root			DontDelete|ReadOnly
@@ -104,7 +104,7 @@ Value getDOMNodeIterator(ExecState *exec, DOM::NodeIterator ni)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo NodeFilterConstructor::info = { "NodeFilterConstructor", 0, &NodeFilterConstructorTable, 0 };
+const ClassInfo NodeFilterConstructor::info = { "NodeFilterConstructor", nullptr, &NodeFilterConstructorTable, nullptr };
 /*
 @begin NodeFilterConstructorTable 17
   FILTER_ACCEPT		DOM::NodeFilter::FILTER_ACCEPT	DontDelete|ReadOnly
@@ -149,7 +149,7 @@ Value getNodeFilterConstructor(ExecState *exec)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMNodeFilter::info = { "NodeFilter", 0, 0, 0 };
+const ClassInfo DOMNodeFilter::info = { "NodeFilter", nullptr, nullptr, nullptr };
 /*
 @begin DOMNodeFilterProtoTable 1
   acceptNode	DOMNodeFilter::AcceptNode	DontDelete|Function 0
@@ -185,7 +185,7 @@ Value getDOMNodeFilter(ExecState *exec, DOM::NodeFilter nf)
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMTreeWalker::info = { "TreeWalker", 0, &DOMTreeWalkerTable, 0 };
+const ClassInfo DOMTreeWalker::info = { "TreeWalker", nullptr, &DOMTreeWalkerTable, nullptr };
 /*
 @begin DOMTreeWalkerTable 5
   root			DOMTreeWalker::Root		DontDelete|ReadOnly
diff --git a/tdehtml/ecma/kjs_views.cpp b/tdehtml/ecma/kjs_views.cpp
index 00b8e4e5b..ecdcc522b 100644
--- a/tdehtml/ecma/kjs_views.cpp
+++ b/tdehtml/ecma/kjs_views.cpp
@@ -26,7 +26,7 @@ using namespace KJS;
 
 // -------------------------------------------------------------------------
 
-const ClassInfo DOMAbstractView::info = { "AbstractView", 0, &DOMAbstractViewTable, 0 };
+const ClassInfo DOMAbstractView::info = { "AbstractView", nullptr, &DOMAbstractViewTable, nullptr };
 /*
 @begin DOMAbstractViewTable 2
   document		DOMAbstractView::Document		DontDelete|ReadOnly
diff --git a/tdehtml/ecma/kjs_window.cpp b/tdehtml/ecma/kjs_window.cpp
index cd35624f6..0d9526203 100644
--- a/tdehtml/ecma/kjs_window.cpp
+++ b/tdehtml/ecma/kjs_window.cpp
@@ -144,7 +144,7 @@ namespace KJS {
 @end
 */
 
-const ClassInfo Screen::info = { "Screen", 0, &ScreenTable, 0 };
+const ClassInfo Screen::info = { "Screen", nullptr, &ScreenTable, nullptr };
 
 // We set the object prototype so that toString is implemented
 Screen::Screen(ExecState *exec)
@@ -161,7 +161,7 @@ Value Screen::get(ExecState *exec, const Identifier &p) const
 Value Screen::getValueProperty(ExecState *exec, int token) const
 {
 #if defined TQ_WS_X11 && ! defined K_WS_QTONLY
-  TWinModule info(0, TWinModule::INFO_DESKTOP);
+  TWinModule info(nullptr, TWinModule::INFO_DESKTOP);
 #endif
   TQWidget *thisWidget = Window::retrieveActive(exec)->part()->widget();
   TQRect sg = TDEGlobalSettings::desktopGeometry(thisWidget);
@@ -216,7 +216,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
 
 ////////////////////// Window Object ////////////////////////
 
-const ClassInfo Window::info = { "Window", &DOMAbstractView::info, &WindowTable, 0 };
+const ClassInfo Window::info = { "Window", &DOMAbstractView::info, &WindowTable, nullptr };
 
 /*
 @begin WindowTable 162
@@ -404,7 +404,7 @@ const ClassInfo Window::info = { "Window", &DOMAbstractView::info, &WindowTable,
 IMPLEMENT_PROTOFUNC_DOM(WindowFunc)
 
 Window::Window(tdehtml::ChildFrame *p)
-  : ObjectImp(/*no proto*/), m_frame(p), screen(0), history(0), external(0), m_frames(0), loc(0), m_evt(0)
+  : ObjectImp(/*no proto*/), m_frame(p), screen(nullptr), history(nullptr), external(nullptr), m_frames(nullptr), loc(nullptr), m_evt(nullptr)
 {
   winq = new WindowQObject(this);
   //kdDebug(6070) << "Window::Window this=" << this << " part=" << m_part << " " << m_part->name() << endl;
@@ -430,7 +430,7 @@ Window *Window::retrieveWindow(KParts::ReadOnlyPart *p)
   }
 #endif
   if ( !obj.isValid() ) // JS disabled
-    return 0;
+    return nullptr;
   return static_cast<KJS::Window*>(obj.imp());
 }
 
@@ -448,7 +448,7 @@ Value Window::retrieve(KParts::ReadOnlyPart *p)
 {
   assert(p);
   TDEHTMLPart * part = ::tqt_cast<TDEHTMLPart *>(p);
-  KJSProxy *proxy = 0L;
+  KJSProxy *proxy = nullptr;
   if (!part) {
     part = ::tqt_cast<TDEHTMLPart *>(p->parent());
     if (part)
@@ -481,7 +481,7 @@ ObjectImp* Window::frames( ExecState* exec ) const
   if (part)
     return m_frames ? m_frames :
       (const_cast<Window*>(this)->m_frames = new FrameArray(exec, part));
-  return 0L;
+  return nullptr;
 }
 
 // reference our special objects during garbage collection
@@ -1245,9 +1245,9 @@ void Window::closeNow()
     } else {
       //kdDebug(6070) << k_funcinfo << " -> closing window" << endl;
       // We want to make sure that window.open won't find this part by name.
-      part->setName( 0 );
+      part->setName( nullptr );
       part->deleteLater();
-      part = 0;
+      part = nullptr;
     }
   }
 }
@@ -1358,7 +1358,7 @@ JSEventListener *Window::getJSEventListener(const Value& val, bool html)
   // This function is so hot that it's worth coding it directly with imps.
   TDEHTMLPart *part = ::tqt_cast<TDEHTMLPart *>(m_frame->m_part);
   if (!part || val.type() != ObjectType)
-    return 0;
+    return nullptr;
 
   // It's ObjectType, so it must be valid.
   Object listenerObject = Object::dynamicCast(val);
@@ -1400,7 +1400,7 @@ JSLazyEventListener *Window::getJSLazyEventListener(const TQString& code, const
 void Window::clear( ExecState *exec )
 {
   delete winq;
-  winq = 0L;
+  winq = nullptr;
   // Get rid of everything, those user vars could hold references to DOM nodes
   deleteAllProperties( exec );
 
@@ -1459,7 +1459,7 @@ void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory)
 }
 
 KParts::ReadOnlyPart *Window::part() const {
-    return m_frame.isNull() ? 0L : static_cast<KParts::ReadOnlyPart *>(m_frame->m_part);
+    return m_frame.isNull() ? nullptr : static_cast<KParts::ReadOnlyPart *>(m_frame->m_part);
 }
 
 void Window::delayedGoHistory( int steps )
@@ -1588,7 +1588,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
 
   if ( policy != TDEHTMLSettings::KJSWindowOpenAllow ) {
     if ( url.isEmpty() )
-      part->setSuppressedPopupIndicator(true, 0);
+      part->setSuppressedPopupIndicator(true, nullptr);
     else {
       part->setSuppressedPopupIndicator(true, part);
       m_suppressedWindowInfo.append( SuppressedWindowInfo( url, frameName, features ) );
@@ -1700,7 +1700,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
     uargs.serviceType = "text/html";
 
     // request window (new or existing if framename is set)
-    KParts::ReadOnlyPart *newPart = 0L;
+    KParts::ReadOnlyPart *newPart = nullptr;
     emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart);
     if (newPart && ::tqt_cast<TDEHTMLPart*>(newPart)) {
       TDEHTMLPart *tdehtmlpart = static_cast<TDEHTMLPart*>(newPart);
@@ -2101,7 +2101,7 @@ ScheduledAction::ScheduledAction(TQString _code, DateTimeMS _nextTime, int _inte
   //kdDebug(6070) << "ScheduledAction::ScheduledAction(!isFunction) " << this << endl;
   //func = 0;
   //args = 0;
-  func = 0;
+  func = nullptr;
   code = _code;
   isFunction = false;
   singleShot = _singleShot;
@@ -2463,7 +2463,7 @@ Value FrameArray::call(ExecState *exec, Object &/*thisObj*/, const List &args)
 
 ////////////////////// Location Object ////////////////////////
 
-const ClassInfo Location::info = { "Location", 0, &LocationTable, 0 };
+const ClassInfo Location::info = { "Location", nullptr, &LocationTable, nullptr };
 /*
 @begin LocationTable 11
   hash		Location::Hash		DontDelete
@@ -2493,7 +2493,7 @@ Location::~Location()
 }
 
 KParts::ReadOnlyPart *Location::part() const {
-  return m_frame ? static_cast<KParts::ReadOnlyPart *>(m_frame->m_part) : 0L;
+  return m_frame ? static_cast<KParts::ReadOnlyPart *>(m_frame->m_part) : nullptr;
 }
 
 Value Location::get(ExecState *exec, const Identifier &p) const
@@ -2695,7 +2695,7 @@ Value LocationFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 
 ////////////////////// External Object ////////////////////////
 
-const ClassInfo External::info = { "External", 0, 0, 0 };
+const ClassInfo External::info = { "External", nullptr, nullptr, nullptr };
 /*
 @begin ExternalTable 4
   addFavorite	External::AddFavorite	DontDelete|Function 1
@@ -2774,7 +2774,7 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 
 ////////////////////// History Object ////////////////////////
 
-const ClassInfo History::info = { "History", 0, 0, 0 };
+const ClassInfo History::info = { "History", nullptr, nullptr, nullptr };
 /*
 @begin HistoryTable 4
   length	History::Length		DontDelete|ReadOnly
diff --git a/tdehtml/ecma/xmlhttprequest.cpp b/tdehtml/ecma/xmlhttprequest.cpp
index d5937e9a0..eae6b9c16 100644
--- a/tdehtml/ecma/xmlhttprequest.cpp
+++ b/tdehtml/ecma/xmlhttprequest.cpp
@@ -116,7 +116,7 @@ Object XMLHttpRequestConstructorImp::construct(ExecState *exec, const List &)
   return Object(new XMLHttpRequest(exec, doc));
 }
 
-const ClassInfo XMLHttpRequest::info = { "XMLHttpRequest", 0, &XMLHttpRequestTable, 0 };
+const ClassInfo XMLHttpRequest::info = { "XMLHttpRequest", nullptr, &XMLHttpRequestTable, nullptr };
 
 
 /* Source for XMLHttpRequestTable.
@@ -239,11 +239,11 @@ XMLHttpRequest::XMLHttpRequest(ExecState *exec, const DOM::Document &d)
     doc(static_cast<DOM::DocumentImpl*>(d.handle())),
     async(true),
     contentType(TQString::null),
-    job(0),
+    job(nullptr),
     state(Uninitialized),
-    onReadyStateChangeListener(0),
-    onLoadListener(0),
-    decoder(0),
+    onReadyStateChangeListener(nullptr),
+    onLoadListener(nullptr),
+    decoder(nullptr),
     createdDocument(false),
     aborted(false)
 {
@@ -256,9 +256,9 @@ XMLHttpRequest::~XMLHttpRequest()
   if (onLoadListener)
     onLoadListener->deref();
   delete qObject;
-  qObject = 0;
+  qObject = nullptr;
   delete decoder;
-  decoder = 0;
+  decoder = nullptr;
 }
 
 void XMLHttpRequest::changeState(XMLHttpRequestState newState)
@@ -268,13 +268,13 @@ void XMLHttpRequest::changeState(XMLHttpRequestState newState)
 
     ref();
 
-    if (onReadyStateChangeListener != 0 && doc->view() && doc->view()->part()) {
+    if (onReadyStateChangeListener && doc->view() && doc->view()->part()) {
       DOM::Event ev = doc->view()->part()->document().createEvent("HTMLEvents");
       ev.initEvent("readystatechange", true, true);
       onReadyStateChangeListener->handleEvent(ev);
     }
 
-    if (state == Completed && onLoadListener != 0 && doc->view() && doc->view()->part()) {
+    if (state == Completed && onLoadListener && doc->view() && doc->view()->part()) {
       DOM::Event ev = doc->view()->part()->document().createEvent("HTMLEvents");
       ev.initEvent("load", true, true);
       onLoadListener->handleEvent(ev);
@@ -411,11 +411,11 @@ void XMLHttpRequest::send(const TQString& _body)
     data = KWQServeSynchronousRequest(tdehtml::Cache::loader(), doc->docLoader(), job, finalURL, headers);
 #else
     TQMap<TQString, TQString> metaData;
-    if ( NetAccess::synchronousRun( job, 0, &data, &finalURL, &metaData ) ) {
+    if ( NetAccess::synchronousRun( job, nullptr, &data, &finalURL, &metaData ) ) {
       headers = metaData[ "HTTP-Headers" ];
     }
 #endif
-    job = 0;
+    job = nullptr;
     processSyncLoadResults(data, finalURL, headers);
     return;
   }
@@ -443,10 +443,10 @@ void XMLHttpRequest::abort()
 {
   if (job) {
     job->kill();
-    job = 0;
+    job = nullptr;
   }
   delete decoder;
-  decoder = 0;
+  decoder = nullptr;
   aborted = true;
 }
 
@@ -599,14 +599,14 @@ void XMLHttpRequest::processSyncLoadResults(const TQByteArray &data, const KURL
 
   slotData(0, bytes, len);
 #else
-  slotData(0, data);
+  slotData(nullptr, data);
 #endif
 
   if (aborted) {
     return;
   }
 
-  slotFinished(0);
+  slotFinished(nullptr);
 }
 
 void XMLHttpRequest::slotFinished(TDEIO::Job *)
@@ -617,11 +617,11 @@ void XMLHttpRequest::slotFinished(TDEIO::Job *)
 
   // make sure to forget about the job before emitting completed,
   // since changeState triggers JS code, which might e.g. call abort.
-  job = 0;
+  job = nullptr;
   changeState(Completed);
 
   delete decoder;
-  decoder = 0;
+  decoder = nullptr;
 }
 
 void XMLHttpRequest::slotRedirection(TDEIO::Job*, const KURL& url)
@@ -657,7 +657,7 @@ void XMLHttpRequest::slotData(TDEIO::Job*, const TQByteArray &_data)
   int len = (int)_data.size();
 #endif
 
-  if ( decoder == NULL ) {
+  if ( !decoder ) {
     int pos = responseHeaders.find("content-type:", 0, false);
 
     if ( pos > -1 ) {
diff --git a/tdehtml/ecma/xmlserializer.cpp b/tdehtml/ecma/xmlserializer.cpp
index 0868a839e..e0691e034 100644
--- a/tdehtml/ecma/xmlserializer.cpp
+++ b/tdehtml/ecma/xmlserializer.cpp
@@ -56,7 +56,7 @@ Object XMLSerializerConstructorImp::construct(ExecState *exec, const List &)
   return Object(new XMLSerializer(exec));
 }
 
-const ClassInfo XMLSerializer::info = { "XMLSerializer", 0, 0, 0 };
+const ClassInfo XMLSerializer::info = { "XMLSerializer", nullptr, nullptr, nullptr };
 
 XMLSerializer::XMLSerializer(ExecState *exec)
   : DOMObject(XMLSerializerProto::self(exec))
diff --git a/tdehtml/html/RefPtr.h b/tdehtml/html/RefPtr.h
index 40fd55bdf..11a39b8e4 100644
--- a/tdehtml/html/RefPtr.h
+++ b/tdehtml/html/RefPtr.h
@@ -34,7 +34,7 @@ namespace WTF {
 
     template <typename T> class RefPtr {
     public:
-        RefPtr() : m_ptr(0) { }
+        RefPtr() : m_ptr(nullptr) { }
         RefPtr(T* ptr) : m_ptr(ptr) { if (ptr) ptr->ref(); }
         RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { if (T* ptr = m_ptr) ptr->ref(); }
         // see comment in PassRefPtr.h for why this takes const reference
@@ -53,8 +53,8 @@ namespace WTF {
 
         T* get() const { return m_ptr; }
 
-        void clear() { if (T* ptr = m_ptr) ptr->deref(); m_ptr = 0; }
-        PassRefPtr<T> release() { PassRefPtr<T> tmp = adoptRef(m_ptr); m_ptr = 0; return tmp; }
+        void clear() { if (T* ptr = m_ptr) ptr->deref(); m_ptr = nullptr; }
+        PassRefPtr<T> release() { PassRefPtr<T> tmp = adoptRef(m_ptr); m_ptr = nullptr; return tmp; }
 
         T& operator*() const { return *m_ptr; }
         ALWAYS_INLINE T* operator->() const { return m_ptr; }
@@ -63,7 +63,7 @@ namespace WTF {
 
         // This conversion operator allows implicit conversion to bool but not to other integer types.
         typedef T* RefPtr::*UnspecifiedBoolType;
-        operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; }
+        operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : nullptr; }
 
         RefPtr& operator=(const RefPtr&);
         RefPtr& operator=(T*);
diff --git a/tdehtml/html/html_baseimpl.cpp b/tdehtml/html/html_baseimpl.cpp
index e8150a387..dff43bdf9 100644
--- a/tdehtml/html/html_baseimpl.cpp
+++ b/tdehtml/html/html_baseimpl.cpp
@@ -52,7 +52,7 @@ HTMLBodyElementImpl::HTMLBodyElementImpl(DocumentImpl *doc)
     : HTMLElementImpl(doc),
     m_bgSet( false ), m_fgSet( false )
 {
-    m_styleSheet = 0;
+    m_styleSheet = nullptr;
 }
 
 HTMLBodyElementImpl::~HTMLBodyElementImpl()
@@ -140,39 +140,39 @@ void HTMLBodyElementImpl::parseAttribute(AttributeImpl *attr)
     }
     case ATTR_ONLOAD:
         getDocument()->setHTMLWindowEventListener(EventImpl::LOAD_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onload", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onload", nullptr));
         break;
     case ATTR_ONUNLOAD:
         getDocument()->setHTMLWindowEventListener(EventImpl::UNLOAD_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onunload", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onunload", nullptr));
         break;
     case ATTR_ONBLUR:
         getDocument()->setHTMLWindowEventListener(EventImpl::BLUR_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onblur", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onblur", nullptr));
         break;
     case ATTR_ONFOCUS:
         getDocument()->setHTMLWindowEventListener(EventImpl::FOCUS_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onfocus", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onfocus", nullptr));
         break;
     case ATTR_ONRESIZE:
         getDocument()->setHTMLWindowEventListener(EventImpl::RESIZE_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onresize", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onresize", nullptr));
         break;
     case ATTR_ONKEYUP:
         getDocument()->setHTMLWindowEventListener(EventImpl::KEYUP_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onkeyup", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onkeyup", nullptr));
         break;
     case ATTR_ONKEYDOWN:
         getDocument()->setHTMLWindowEventListener(EventImpl::KEYDOWN_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onkeydown", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onkeydown", nullptr));
         break;
     case ATTR_ONKEYPRESS:
         getDocument()->setHTMLWindowEventListener(EventImpl::KEYPRESS_EVENT,
-	    getDocument()->createHTMLEventListener(attr->value().string(), "onkeypress", NULL));
+	    getDocument()->createHTMLEventListener(attr->value().string(), "onkeypress", nullptr));
         break;
     case ATTR_ONSCROLL:
         getDocument()->setHTMLWindowEventListener(EventImpl::SCROLL_EVENT,
-            getDocument()->createHTMLEventListener(attr->value().string(), "onscroll", NULL));
+            getDocument()->createHTMLEventListener(attr->value().string(), "onscroll", nullptr));
         break;
     case ATTR_NOSAVE:
 	break;
@@ -268,7 +268,7 @@ void HTMLFrameElementImpl::parseAttribute(AttributeImpl *attr)
     case ATTR_FRAMEBORDER:
     {
         frameBorder = attr->value().toInt();
-        frameBorderSet = ( attr->val() != 0 );
+        frameBorderSet = ( attr->val() != nullptr );
         // FIXME: when attached, has no effect
     }
     break;
@@ -393,7 +393,7 @@ void HTMLFrameElementImpl::setLocation( const DOMString& str )
 
 bool HTMLFrameElementImpl::isFocusable() const
 {
-    return m_render!=0;
+    return m_render!=nullptr;
 }
 
 void HTMLFrameElementImpl::setFocus(bool received)
@@ -410,26 +410,26 @@ void HTMLFrameElementImpl::setFocus(bool received)
 
 DocumentImpl* HTMLFrameElementImpl::contentDocument() const
 {
-    if ( !m_render ) return 0;
+    if ( !m_render ) return nullptr;
 
     RenderPart* render = static_cast<RenderPart*>( m_render );
 
     if(render->widget() && ::tqt_cast<TDEHTMLView*>( render->widget()) )
         return static_cast<TDEHTMLView*>( render->widget() )->part()->xmlDocImpl();
 
-    return 0;
+    return nullptr;
 }
 
 TDEHTMLPart*   HTMLFrameElementImpl::contentPart() const
 {
-    if ( !m_render ) return 0;
+    if ( !m_render ) return nullptr;
 
     RenderPart* render = static_cast<RenderPart*>( m_render );
 
     if(render->widget() && ::tqt_cast<TDEHTMLView*>( render->widget()) )
         return static_cast<TDEHTMLView*>( render->widget() )->part();
 
-    return 0;
+    return nullptr;
 }
 
 // -------------------------------------------------------------------------
@@ -441,7 +441,7 @@ HTMLFrameSetElementImpl::HTMLFrameSetElementImpl(DocumentImpl *doc)
     m_totalRows = 1;
     m_totalCols = 1;
 
-    m_rows = m_cols = 0;
+    m_rows = m_cols = nullptr;
 
     frameborder = true;
     frameBorderSet = false;
@@ -450,7 +450,7 @@ HTMLFrameSetElementImpl::HTMLFrameSetElementImpl(DocumentImpl *doc)
 
     m_resizing = false;
 
-    m_onLoad = m_onUnLoad = 0;
+    m_onLoad = m_onUnLoad = nullptr;
 }
 
 HTMLFrameSetElementImpl::~HTMLFrameSetElementImpl()
@@ -459,10 +459,10 @@ HTMLFrameSetElementImpl::~HTMLFrameSetElementImpl()
     //which needs to be recomputed, but this is better than crashing...
     if (getDocument()) {
         if (m_onLoad && getDocument()->getHTMLEventListener(EventImpl::LOAD_EVENT) == m_onLoad)
-            getDocument()->setHTMLEventListener(EventImpl::LOAD_EVENT, 0);
+            getDocument()->setHTMLEventListener(EventImpl::LOAD_EVENT, nullptr);
 
         if (m_onUnLoad && getDocument()->getHTMLEventListener(EventImpl::UNLOAD_EVENT) == m_onUnLoad)
-            getDocument()->setHTMLEventListener(EventImpl::UNLOAD_EVENT, 0);
+            getDocument()->setHTMLEventListener(EventImpl::UNLOAD_EVENT, nullptr);
     }
 
     delete [] m_rows;
diff --git a/tdehtml/html/html_documentimpl.cpp b/tdehtml/html/html_documentimpl.cpp
index 346af3d08..fedd080f1 100644
--- a/tdehtml/html/html_documentimpl.cpp
+++ b/tdehtml/html/html_documentimpl.cpp
@@ -73,7 +73,7 @@ HTMLDocumentImpl::HTMLDocumentImpl(DOMImplementationImpl *_implementation, TDEHT
   : DocumentImpl(_implementation, v)
 {
 //    kdDebug( 6090 ) << "HTMLDocumentImpl constructor this = " << this << endl;
-    htmlElement = 0;
+    htmlElement = nullptr;
 
     m_doAutoFill = false;
 
@@ -168,10 +168,10 @@ HTMLElementImpl *HTMLDocumentImpl::body()
 {
     NodeImpl *de = documentElement();
     if (!de)
-        return 0;
+        return nullptr;
 
     // try to prefer a FRAMESET element over BODY
-    NodeImpl* body = 0;
+    NodeImpl* body = nullptr;
     for (NodeImpl* i = de->firstChild(); i; i = i->nextSibling()) {
         if (i->id() == ID_FRAMESET)
             return static_cast<HTMLElementImpl*>(i);
@@ -242,7 +242,7 @@ HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url)
     if (it != mapMap.end())
         return *it;
     else
-        return 0;
+        return nullptr;
 }
 
 void HTMLDocumentImpl::close()
diff --git a/tdehtml/html/html_documentimpl.h b/tdehtml/html/html_documentimpl.h
index f7191f31a..7347534cd 100644
--- a/tdehtml/html/html_documentimpl.h
+++ b/tdehtml/html/html_documentimpl.h
@@ -45,7 +45,7 @@ class HTMLDocumentImpl : public DOM::DocumentImpl
 {
     TQ_OBJECT
 public:
-    HTMLDocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *v = 0);
+    HTMLDocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *v = nullptr);
     ~HTMLDocumentImpl();
 
     virtual bool isHTMLDocument() const { return true; }
diff --git a/tdehtml/html/html_elementimpl.cpp b/tdehtml/html/html_elementimpl.cpp
index 121d2b35e..c8488d599 100644
--- a/tdehtml/html/html_elementimpl.cpp
+++ b/tdehtml/html/html_elementimpl.cpp
@@ -454,7 +454,7 @@ void HTMLElementImpl::removeCSSProperty(int id)
 DOMString HTMLElementImpl::innerHTML() const
 {
     TQString result; //Use TQString to accumulate since DOMString is poor for appends
-    for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
+    for (NodeImpl *child = firstChild(); child; child = child->nextSibling()) {
         DOMString kid = child->toString();
         result += TQConstString(kid.unicode(), kid.length()).string();
     }
@@ -475,7 +475,7 @@ DOMString HTMLElementImpl::innerText() const
         else if(n->nextSibling())
             n = n->nextSibling();
         else {
-            NodeImpl *next = 0;
+            NodeImpl *next = nullptr;
             while(!next) {
                 n = n->parentNode();
                 if(!n || n == (NodeImpl *)this ) goto end;
diff --git a/tdehtml/html/html_formimpl.cpp b/tdehtml/html/html_formimpl.cpp
index f87260ffe..359340675 100644
--- a/tdehtml/html/html_formimpl.cpp
+++ b/tdehtml/html/html_formimpl.cpp
@@ -95,10 +95,10 @@ HTMLFormElementImpl::~HTMLFormElementImpl()
     }
     TQPtrListIterator<HTMLGenericFormElementImpl> it(formElements);
     for (; it.current(); ++it)
-        it.current()->m_form = 0;
+        it.current()->m_form = nullptr;
     TQPtrListIterator<HTMLImageElementImpl> it2(imgElements);
     for (; it2.current(); ++it2)
-        it2.current()->m_form = 0;
+        it2.current()->m_form = nullptr;
 }
 
 NodeImpl::Id HTMLFormElementImpl::id() const
@@ -222,7 +222,7 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok)
     const unsigned int strLength = str.length();
     for(unsigned int i=0; i < strLength; ++i) if(str[i].latin1() == ',') str[i] = space;
     const TQStringList charsets = TQStringList::split(' ', str);
-    TQTextCodec* codec = 0;
+    TQTextCodec* codec = nullptr;
     TDEHTMLView *view = getDocument()->view();
     {
         TQStringList::ConstIterator it = charsets.begin();
@@ -349,7 +349,7 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok)
     }
 
     if (fileNotUploads.count()) {
-        const int result = KMessageBox::warningContinueCancelList( 0,
+        const int result = KMessageBox::warningContinueCancelList( nullptr,
                                                              i18n("The following files will not be uploaded"
                                                                   " because they could not be found.\n"
                                                                   "Do you want to continue?"),
@@ -364,7 +364,7 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok)
     }
 
     if (fileUploads.count()) {
-        const int result = KMessageBox::warningContinueCancelList( 0,
+        const int result = KMessageBox::warningContinueCancelList( nullptr,
                                                              i18n("You're about to transfer the following files from "
                                                                   "your local computer to the Internet.\n"
                                                                   "Do you really want to continue?"),
@@ -609,7 +609,7 @@ void HTMLFormElementImpl::submit(  )
                 KDialogBase* const dialog = new KDialogBase(i18n("Save Login Information"),
                                                           KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel,
                                                           KDialogBase::Yes, KDialogBase::Cancel,
-                                                          0, "questionYesNoCancel", true, true,
+                                                          nullptr, "questionYesNoCancel", true, true,
                                                           i18n("Store"), KGuiItem(i18n("Ne&ver for This Site")), i18n("Do Not Store"));
 
                 bool checkboxResult = false;
@@ -782,7 +782,7 @@ HTMLGenericFormElementImpl::HTMLGenericFormElementImpl(DocumentImpl *doc, HTMLFo
     : HTMLElementImpl(doc)
 {
     m_disabled = m_readOnly = false;
-    m_name = 0;
+    m_name = nullptr;
 
     if (f)
 	m_form = f;
@@ -812,7 +812,7 @@ void HTMLGenericFormElementImpl::removedFromDocument()
     if (m_form)
         m_form->removeFormElement(this);
 
-    m_form = 0;
+    m_form = nullptr;
 }
 
 HTMLGenericFormElementImpl::~HTMLGenericFormElementImpl()
@@ -827,12 +827,12 @@ void HTMLGenericFormElementImpl::parseAttribute(AttributeImpl *attr)
     switch(attr->id())
     {
     case ATTR_DISABLED:
-        setDisabled( attr->val() != 0 );
+        setDisabled( attr->val() != nullptr );
         break;
     case ATTR_READONLY:
     {
         const bool m_oldreadOnly = m_readOnly;
-        m_readOnly = attr->val() != 0;
+        m_readOnly = attr->val() != nullptr;
         if (m_oldreadOnly != m_readOnly) setChanged();
         break;
     }
@@ -891,7 +891,7 @@ HTMLFormElementImpl *HTMLGenericFormElementImpl::getForm() const
     kdDebug( 6030 ) << "couldn't find form!" << endl;
     kdDebug( 6030 ) << kdBacktrace() << endl;
 #endif
-    return 0;
+    return nullptr;
 }
 
 DOMString HTMLGenericFormElementImpl::name() const
@@ -1080,7 +1080,7 @@ DOMString HTMLButtonElementImpl::type() const
 void HTMLButtonElementImpl::blur()
 {
     if(getDocument()->focusNode() == this)
-        getDocument()->setFocusNode(0);
+        getDocument()->setFocusNode(nullptr);
 }
 
 void HTMLButtonElementImpl::focus()
@@ -1456,7 +1456,7 @@ void HTMLInputElementImpl::attach()
                     nvalue += value[i];
             m_value = nvalue;
         }
-        m_defaultChecked = (getAttribute(ATTR_CHECKED) != 0);
+        m_defaultChecked = (getAttribute(ATTR_CHECKED) != nullptr);
         if ( m_type == IMAGE )
             addHTMLAlignment( getAttribute( ATTR_ALIGN ) );
         m_inited = true;
@@ -1740,7 +1740,7 @@ void HTMLInputElementImpl::setValue(DOMString val)
 void HTMLInputElementImpl::blur()
 {
     if(getDocument()->focusNode() == this)
-	getDocument()->setFocusNode(0);
+	getDocument()->setFocusNode(nullptr);
 }
 
 void HTMLInputElementImpl::focus()
@@ -1890,7 +1890,7 @@ void HTMLLabelElementImpl::attach()
 NodeImpl* HTMLLabelElementImpl::getFormElement()
 {
 	    const DOMString formElementId = getAttribute(ATTR_FOR);
-	    NodeImpl *newNode=0L;
+	    NodeImpl *newNode=nullptr;
     	    if (!formElementId.isEmpty())
 	        newNode=getDocument()->getElementById(formElementId);
     	    if (!newNode){
@@ -2054,7 +2054,7 @@ void HTMLSelectElementImpl::add( const HTMLElement &element, const HTMLElement &
     //Fast path for appending an item. Can't be done if it is selected and
     //we're single-select, since we may need to drop an implicitly-selected item
     bool fastAppendLast = false;
-    if (before.handle() == 0 && (m_multiple || !option->selected()) && !m_recalcListItems)
+    if (!before.handle() && (m_multiple || !option->selected()) && !m_recalcListItems)
         fastAppendLast = true;
 
     insertBefore(option, before.handle(), exceptioncode );
@@ -2099,7 +2099,7 @@ void HTMLSelectElementImpl::remove( long index )
 void HTMLSelectElementImpl::blur()
 {
     if(getDocument()->focusNode() == this)
-	getDocument()->setFocusNode(0);
+	getDocument()->setFocusNode(nullptr);
 }
 
 void HTMLSelectElementImpl::focus()
@@ -2258,7 +2258,7 @@ void HTMLSelectElementImpl::parseAttribute(AttributeImpl *attr)
         m_minwidth = kMax( attr->val()->toInt(), 0 );
         break;
     case ATTR_MULTIPLE:
-        m_multiple = (attr->val() != 0);
+        m_multiple = (attr->val() != nullptr);
         break;
     case ATTR_ACCESSKEY:
         break;
@@ -2370,7 +2370,7 @@ void HTMLSelectElementImpl::recalcListItems() const
 {
     NodeImpl* current = firstChild();
     m_listItems.resize(0);
-    HTMLOptionElementImpl* foundSelected = 0;
+    HTMLOptionElementImpl* foundSelected = nullptr;
     m_length = 0;
     while(current) {
         if (current->id() == ID_OPTGROUP && current->firstChild()) {
@@ -2585,7 +2585,7 @@ void HTMLOptionElementImpl::parseAttribute(AttributeImpl *attr)
     switch(attr->id())
     {
     case ATTR_SELECTED:
-        m_selected = (attr->val() != 0);
+        m_selected = (attr->val() != nullptr);
         break;
     case ATTR_VALUE:
         m_value = attr->value();
@@ -2862,7 +2862,7 @@ void HTMLTextAreaElementImpl::setDefaultValue(DOMString _defaultValue)
 void HTMLTextAreaElementImpl::blur()
 {
     if(getDocument()->focusNode() == this)
-	getDocument()->setFocusNode(0);
+	getDocument()->setFocusNode(nullptr);
 }
 
 void HTMLTextAreaElementImpl::focus()
diff --git a/tdehtml/html/html_formimpl.h b/tdehtml/html/html_formimpl.h
index 0888db146..671153602 100644
--- a/tdehtml/html/html_formimpl.h
+++ b/tdehtml/html/html_formimpl.h
@@ -137,7 +137,7 @@ class HTMLGenericFormElementImpl : public HTMLElementImpl
     friend class tdehtml::RenderFormElement;
 
 public:
-    HTMLGenericFormElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLGenericFormElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
     virtual ~HTMLGenericFormElementImpl();
 
     HTMLFormElementImpl *form() { return m_form; }
@@ -189,7 +189,7 @@ protected:
 class HTMLButtonElementImpl : public HTMLGenericFormElementImpl
 {
 public:
-    HTMLButtonElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLButtonElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
 
     virtual ~HTMLButtonElementImpl();
 
@@ -227,7 +227,7 @@ protected:
 class HTMLFieldSetElementImpl : public HTMLGenericFormElementImpl
 {
 public:
-    HTMLFieldSetElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLFieldSetElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
 
     virtual ~HTMLFieldSetElementImpl();
 
@@ -261,7 +261,7 @@ public:
         BUTTON
     };
 
-    HTMLInputElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLInputElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
     virtual ~HTMLInputElementImpl();
 
     virtual Id id() const;
@@ -366,7 +366,7 @@ public:
 class HTMLLegendElementImpl : public HTMLGenericFormElementImpl
 {
 public:
-    HTMLLegendElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLLegendElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
     virtual ~HTMLLegendElementImpl();
 
     virtual Id id() const;
@@ -382,7 +382,7 @@ class HTMLSelectElementImpl : public HTMLGenericFormElementImpl
     friend class tdehtml::RenderSelect;
 
 public:
-    HTMLSelectElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLSelectElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
     ~HTMLSelectElementImpl();
 
     virtual Id id() const;
@@ -459,7 +459,7 @@ protected:
 class HTMLKeygenElementImpl : public HTMLSelectElementImpl
 {
 public:
-    HTMLKeygenElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLKeygenElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
 
     virtual Id id() const;
 
@@ -481,7 +481,7 @@ public:
 class HTMLOptGroupElementImpl : public HTMLGenericFormElementImpl
 {
 public:
-    HTMLOptGroupElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0)
+    HTMLOptGroupElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr)
         : HTMLGenericFormElementImpl(doc, f) {}
 
     virtual Id id() const;
@@ -496,7 +496,7 @@ class HTMLOptionElementImpl : public HTMLGenericFormElementImpl
     friend class DOM::HTMLSelectElementImpl;
 
 public:
-    HTMLOptionElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLOptionElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
 
     virtual Id id() const;
 
@@ -532,7 +532,7 @@ public:
         ta_Physical
     };
 
-    HTMLTextAreaElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLTextAreaElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
     ~HTMLTextAreaElementImpl();
 
     virtual Id id() const;
@@ -590,7 +590,7 @@ protected:
 class HTMLIsIndexElementImpl : public HTMLInputElementImpl
 {
 public:
-    HTMLIsIndexElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLIsIndexElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
     ~HTMLIsIndexElementImpl();
 
     virtual Id id() const;
diff --git a/tdehtml/html/html_headimpl.cpp b/tdehtml/html/html_headimpl.cpp
index 347f8c262..1bc9af4a5 100644
--- a/tdehtml/html/html_headimpl.cpp
+++ b/tdehtml/html/html_headimpl.cpp
@@ -175,7 +175,7 @@ void HTMLLinkElementImpl::process()
     TQString type = getAttribute(ATTR_TYPE).string().lower();
     TQString rel = getAttribute(ATTR_REL).string().lower();
 
-    TDEHTMLPart* part = getDocument()->view() ? getDocument()->view()->part() : 0;
+    TDEHTMLPart* part = getDocument()->view() ? getDocument()->view()->part() : nullptr;
 
     // IE extension: location of small icon for locationbar / bookmarks
     // Uses both "shortcut icon" and "icon"
@@ -215,7 +215,7 @@ void HTMLLinkElementImpl::process()
     else if (m_sheet) {
 	// we no longer contain a stylesheet, e.g. perhaps rel or type was changed
 	m_sheet->deref();
-	m_sheet = 0;
+	m_sheet = nullptr;
         m_isCSSSheet = false;
 	getDocument()->updateStyleSelector();
     }
@@ -324,7 +324,7 @@ void HTMLMetaElementImpl::process()
 // -------------------------------------------------------------------------
 
 HTMLScriptElementImpl::HTMLScriptElementImpl(DocumentImpl *doc)
-    : HTMLElementImpl(doc), m_cachedScript(0), m_createdByParser(false), m_evaluated(false)
+    : HTMLElementImpl(doc), m_cachedScript(nullptr), m_createdByParser(false), m_evaluated(false)
 {
 }
 
@@ -385,7 +385,7 @@ void HTMLScriptElementImpl::removedFromDocument()
 
     if (m_cachedScript) {
         m_cachedScript->deref(this);
-        m_cachedScript = 0;
+        m_cachedScript = nullptr;
     }
 }
 
@@ -398,7 +398,7 @@ void HTMLScriptElementImpl::notifyFinished(CachedObject* o)
     TQString   URL    = cs->url().string();
     DOMString script = cs->script();
     cs->deref(this);
-    m_cachedScript = 0;
+    m_cachedScript = nullptr;
 
     evaluateScript(URL, script);
 }
@@ -413,7 +413,7 @@ void HTMLScriptElementImpl::evaluateScript(const TQString &URL, const DOMString
         KJSProxy *proxy = KJSProxy::proxy(part);
         if (proxy) {
             m_evaluated = true;
-            proxy->evaluate(URL, 0, script.string(), 0);
+            proxy->evaluate(URL, 0, script.string(), nullptr);
             DocumentImpl::updateDocumentsRendering();
         }
     }
@@ -487,7 +487,7 @@ bool HTMLScriptElementImpl::defer() const
 
 void HTMLScriptElementImpl::setDefer(bool defer)
 {
-    setAttribute(ATTR_DEFER, defer ? "" : 0);
+    setAttribute(ATTR_DEFER, defer ? "" : nullptr);
 }
 
 DOMString HTMLScriptElementImpl::src() const
@@ -558,7 +558,7 @@ void HTMLStyleElementImpl::childrenChanged()
 
     DOMString text = "";
 
-    for (NodeImpl *c = firstChild(); c != 0; c = c->nextSibling()) {
+    for (NodeImpl *c = firstChild(); c; c = c->nextSibling()) {
 	if ((c->nodeType() == Node::TEXT_NODE) ||
 	    (c->nodeType() == Node::CDATA_SECTION_NODE) ||
 	    (c->nodeType() == Node::COMMENT_NODE))
@@ -567,7 +567,7 @@ void HTMLStyleElementImpl::childrenChanged()
 
     if (m_sheet) {
         m_sheet->deref();
-        m_sheet = 0;
+        m_sheet = nullptr;
     }
 
     m_loading = false;
@@ -612,7 +612,7 @@ void HTMLTitleElementImpl::childrenChanged()
     HTMLElementImpl::childrenChanged();
 
     m_title = "";
-    for (NodeImpl *c = firstChild(); c != 0; c = c->nextSibling()) {
+    for (NodeImpl *c = firstChild(); c; c = c->nextSibling()) {
 	if ((c->nodeType() == Node::TEXT_NODE) || (c->nodeType() == Node::CDATA_SECTION_NODE))
 	    m_title += c->nodeValue();
     }
diff --git a/tdehtml/html/html_headimpl.h b/tdehtml/html/html_headimpl.h
index 8563de6a8..6f639d2e8 100644
--- a/tdehtml/html/html_headimpl.h
+++ b/tdehtml/html/html_headimpl.h
@@ -72,7 +72,7 @@ class HTMLLinkElementImpl : public tdehtml::CachedObjectClient, public HTMLEleme
 {
 public:
     HTMLLinkElementImpl(DocumentImpl *doc)
-        : HTMLElementImpl(doc), m_cachedSheet(0), m_sheet(0), m_isDisabled(false),
+        : HTMLElementImpl(doc), m_cachedSheet(nullptr), m_sheet(nullptr), m_isDisabled(false),
 	m_loading(false), m_alternate(false), m_isCSSSheet(false) {}
 
     ~HTMLLinkElementImpl();
@@ -186,7 +186,7 @@ class HTMLStyleElementImpl : public HTMLElementImpl
 {
 public:
     HTMLStyleElementImpl(DocumentImpl *doc)
-        : HTMLElementImpl(doc), m_sheet(0), m_loading(false) {}
+        : HTMLElementImpl(doc), m_sheet(nullptr), m_loading(false) {}
     ~HTMLStyleElementImpl();
 
     virtual Id id() const;
diff --git a/tdehtml/html/html_imageimpl.cpp b/tdehtml/html/html_imageimpl.cpp
index e356d1e51..5decd6243 100644
--- a/tdehtml/html/html_imageimpl.cpp
+++ b/tdehtml/html/html_imageimpl.cpp
@@ -53,7 +53,7 @@ using namespace tdehtml;
 // -------------------------------------------------------------------------
 
 HTMLImageElementImpl::HTMLImageElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f)
-    : HTMLElementImpl(doc), ismap(false), loadEventSent(true), m_image(0), m_form(f)
+    : HTMLElementImpl(doc), ismap(false), loadEventSent(true), m_image(nullptr), m_form(f)
 {
     if (m_form)
         m_form->registerImgElement(this);
@@ -152,7 +152,7 @@ void HTMLImageElementImpl::parseAttribute(AttributeImpl *attr)
             // the map is on the same html page....
             usemap = url;
         }
-        m_hasAnchor = attr->val() != 0;
+        m_hasAnchor = attr->val() != nullptr;
     case ATTR_ISMAP:
         ismap = true;
         break;
@@ -438,7 +438,7 @@ void HTMLMapElementImpl::parseAttribute(AttributeImpl *attr)
 HTMLAreaElementImpl::HTMLAreaElementImpl(DocumentImpl *doc)
     : HTMLAnchorElementImpl(doc)
 {
-    m_coords=0;
+    m_coords=nullptr;
     m_coordsLen = 0;
     nohref = false;
     shape = Unknown;
@@ -474,10 +474,10 @@ void HTMLAreaElementImpl::parseAttribute(AttributeImpl *attr)
         m_coords = attr->val()->toCoordsArray(m_coordsLen);
         break;
     case ATTR_NOHREF:
-        nohref = attr->val() != 0;
+        nohref = attr->val() != nullptr;
         break;
     case ATTR_TARGET:
-        m_hasTarget = attr->val() != 0;
+        m_hasTarget = attr->val() != nullptr;
         break;
     case ATTR_ALT:
         break;
@@ -509,7 +509,7 @@ bool HTMLAreaElementImpl::mapMouseEvent(int x_, int y_, int width_, int height_,
 
 TQRect HTMLAreaElementImpl::getRect() const
 {
-    if (parentNode()->renderer()==0)
+    if (!parentNode()->renderer())
         return TQRect();
     int dx, dy;
     if (!parentNode()->renderer()->absolutePosition(dx, dy))
diff --git a/tdehtml/html/html_imageimpl.h b/tdehtml/html/html_imageimpl.h
index f36e61295..397acd8f6 100644
--- a/tdehtml/html/html_imageimpl.h
+++ b/tdehtml/html/html_imageimpl.h
@@ -40,7 +40,7 @@ class HTMLImageElementImpl
 {
     friend class HTMLFormElementImpl;
 public:
-    HTMLImageElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = 0);
+    HTMLImageElementImpl(DocumentImpl *doc, HTMLFormElementImpl *f = nullptr);
     ~HTMLImageElementImpl();
 
     virtual Id id() const;
diff --git a/tdehtml/html/html_inlineimpl.cpp b/tdehtml/html/html_inlineimpl.cpp
index 1416ca3f4..fe4eac871 100644
--- a/tdehtml/html/html_inlineimpl.cpp
+++ b/tdehtml/html/html_inlineimpl.cpp
@@ -59,11 +59,11 @@ void HTMLAnchorElementImpl::defaultEventHandler(EventImpl *evt)
     if ( ( (evt->id() == EventImpl::CLICK_EVENT && !static_cast<MouseEventImpl*>(evt)->isDoubleClick()) ||
          ( keydown && m_focused)) && m_hasAnchor) {
 
-        MouseEventImpl *e = 0;
+        MouseEventImpl *e = nullptr;
         if ( evt->id() == EventImpl::CLICK_EVENT )
             e = static_cast<MouseEventImpl*>( evt );
 
-        KeyEventBaseImpl *k = 0;
+        KeyEventBaseImpl *k = nullptr;
         if (keydown)
             k = static_cast<KeyEventBaseImpl *>( evt );
 
@@ -177,14 +177,14 @@ void HTMLAnchorElementImpl::parseAttribute(AttributeImpl *attr)
     case ATTR_HREF:
     {
         bool hadAnchor = m_hasAnchor;
-        m_hasAnchor = attr->val() != 0;
+        m_hasAnchor = attr->val() != nullptr;
         getDocument()->incDOMTreeVersion();
         if (hadAnchor != m_hasAnchor)
             setChanged();
     }
         break;
     case ATTR_TARGET:
-        m_hasTarget = attr->val() != 0;
+        m_hasTarget = attr->val() != nullptr;
         break;
     case ATTR_TITLE:
     case ATTR_REL:
diff --git a/tdehtml/html/html_listimpl.cpp b/tdehtml/html/html_listimpl.cpp
index 1ad450f84..4a25f07d6 100644
--- a/tdehtml/html/html_listimpl.cpp
+++ b/tdehtml/html/html_listimpl.cpp
@@ -136,7 +136,7 @@ void HTMLLIElementImpl::attach()
 
     if ( m_render && m_render->style()->display() == LIST_ITEM ) {
         RenderListItem* render = static_cast<RenderListItem*>( renderer() );
-        NodeImpl* listNode = 0;
+        NodeImpl* listNode = nullptr;
         NodeImpl* n = parentNode();
         while ( !listNode && n ) {
             switch( n->id() ) {
diff --git a/tdehtml/html/html_miscimpl.cpp b/tdehtml/html/html_miscimpl.cpp
index 5b8d4ef4b..3cf25d714 100644
--- a/tdehtml/html/html_miscimpl.cpp
+++ b/tdehtml/html/html_miscimpl.cpp
@@ -223,7 +223,7 @@ NodeImpl *HTMLCollectionImpl::item ( unsigned long index ) const
     long                          sectionIndex;
     HTMLTableSectionElementImpl*  section;
 
-    NodeImpl* found = 0;
+    NodeImpl* found = nullptr;
     if (table->findRowSection(index, section, sectionIndex)) {
         HTMLCollectionImpl rows(section, TSECTION_ROWS);
         found = rows.item(sectionIndex);
@@ -278,7 +278,7 @@ NodeImpl *HTMLCollectionImpl::nextNamedItem( const DOMString &name ) const
         if (checkForNameMatch(candidate, name))
             return candidate;
     }
-    return 0;
+    return nullptr;
 }
 
 TQValueList<NodeImpl*> HTMLCollectionImpl::namedItems( const DOMString &name ) const
@@ -340,7 +340,7 @@ NodeImpl *HTMLFormCollectionImpl::item( unsigned long index ) const
                 --dist;
         }
     }
-    return 0;
+    return nullptr;
 }
 
 unsigned long HTMLFormCollectionImpl::calcLength(NodeImpl *start) const
@@ -381,7 +381,7 @@ NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const
 
     //If we got this far, we may need to start looking through the images,
     //but only if no input tags were matched
-    if (foundInput) return 0;
+    if (foundInput) return nullptr;
 
     TQPtrList<HTMLImageElementImpl>& il = static_cast<HTMLFormElementImpl*>( m_refNode )->imgElements;
     for ( ; currentNameImgPos < il.count(); ++currentNameImgPos )
@@ -395,7 +395,7 @@ NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const
         }
     }
 
-    return 0;
+    return nullptr;
 }
 
 // -------------------------------------------------------------------------
diff --git a/tdehtml/html/html_objectimpl.cpp b/tdehtml/html/html_objectimpl.cpp
index 8c530af61..3ba735122 100644
--- a/tdehtml/html/html_objectimpl.cpp
+++ b/tdehtml/html/html_objectimpl.cpp
@@ -375,7 +375,7 @@ NodeImpl::Id HTMLObjectElementImpl::id() const
 
 HTMLFormElementImpl *HTMLObjectElementImpl::form() const
 {
-  return 0;
+  return nullptr;
 }
 
 void HTMLObjectElementImpl::parseAttribute(AttributeImpl *attr)
@@ -419,12 +419,12 @@ void HTMLObjectElementImpl::parseAttribute(AttributeImpl *attr)
 
 DocumentImpl* HTMLObjectElementImpl::contentDocument() const
 {
-    if ( !m_render ) return 0;
-    if ( !m_render->isWidget() ) return 0;
+    if ( !m_render ) return nullptr;
+    if ( !m_render->isWidget() ) return nullptr;
     TQWidget* widget = static_cast<RenderWidget*>( m_render )->widget();
     if( widget && ::tqt_cast<TDEHTMLView*>( widget ) )
         return static_cast<TDEHTMLView*>( widget )->part()->xmlDocImpl();
-    return 0;
+    return nullptr;
 }
 
 void HTMLObjectElementImpl::attach()
diff --git a/tdehtml/html/html_tableimpl.cpp b/tdehtml/html/html_tableimpl.cpp
index f14ad8583..60972200d 100644
--- a/tdehtml/html/html_tableimpl.cpp
+++ b/tdehtml/html/html_tableimpl.cpp
@@ -216,11 +216,11 @@ static inline HTMLTableSectionElementImpl* processSection(HTMLTableSectionElemen
 {
     lastSection = section;
     if ( index < 0 ) //append/last mode
-        return 0;
+        return nullptr;
     
     long rows   = section->numRows();
     if ( index >= rows ) {
-        section =  0;
+        section =  nullptr;
         index   -= rows;
     }
     return section;
@@ -234,8 +234,8 @@ bool HTMLTableElementImpl::findRowSection(long index,
     HTMLTableSectionElementImpl* foot = tFoot();
     HTMLTableSectionElementImpl* head = tHead();
 
-    HTMLTableSectionElementImpl* section = 0L;
-    HTMLTableSectionElementImpl* lastSection = 0L;
+    HTMLTableSectionElementImpl* section = nullptr;
+    HTMLTableSectionElementImpl* lastSection = nullptr;
 
     if ( head )
         section = processSection( head, lastSection, index );
@@ -287,7 +287,7 @@ HTMLElementImpl *HTMLTableElementImpl::insertRow( long index, int &exceptioncode
 
     // The index is too big.
     exceptioncode = DOMException::INDEX_SIZE_ERR;
-    return 0L;
+    return nullptr;
 }
 
 void HTMLTableElementImpl::deleteRow( long index, int &exceptioncode )
@@ -682,7 +682,7 @@ NodeImpl::Id HTMLTableSectionElementImpl::id() const
 // the index... but they aren't used during usual HTML parsing anyway
 HTMLElementImpl *HTMLTableSectionElementImpl::insertRow( long index, int& exceptioncode )
 {
-    HTMLTableRowElementImpl *r = 0L;
+    HTMLTableRowElementImpl *r = nullptr;
     HTMLCollectionImpl rows(const_cast<HTMLTableSectionElementImpl*>(this), HTMLCollectionImpl::TSECTION_ROWS);
     int numRows = rows.length();
     //kdDebug(6030) << k_funcinfo << "index=" << index << " numRows=" << numRows << endl;
@@ -796,7 +796,7 @@ long HTMLTableRowElementImpl::sectionRowIndex() const
 
 HTMLElementImpl *HTMLTableRowElementImpl::insertCell( long index, int &exceptioncode )
 {
-    HTMLTableCellElementImpl *c = 0L;
+    HTMLTableCellElementImpl *c = nullptr;
     NodeListImpl *children = childNodes();
     int numCells = children ? children->length() : 0;
     if ( index < -1 || index > numCells )
@@ -880,7 +880,7 @@ void HTMLTableCellElementImpl::parseAttribute(AttributeImpl *attr)
         if(cSpan < 1 || cSpan > 1024) cSpan = 1;
         break;
     case ATTR_NOWRAP:
-        if (attr->val() != 0)
+        if (attr->val())
 	    addCSSProperty(CSS_PROP_WHITE_SPACE, CSS_VAL__TDEHTML_NOWRAP);
         else
 	    removeCSSProperty(CSS_PROP_WHITE_SPACE);
diff --git a/tdehtml/html/html_tableimpl.h b/tdehtml/html/html_tableimpl.h
index 76d81ce50..034dc61b1 100644
--- a/tdehtml/html/html_tableimpl.h
+++ b/tdehtml/html/html_tableimpl.h
@@ -185,12 +185,12 @@ other  -- pointer to the child
 template<typename ChildType, int ChildId> class ChildHolder
 {
 public:
-    ChildHolder():ptr(0) {}
+    ChildHolder():ptr(nullptr) {}
 
     ChildType* get(const ElementImpl* parent) const {
         if (static_cast<const NodeImpl *>(ptr) == parent) {
             //Do lookup.
-            ptr = 0;
+            ptr = nullptr;
             for (NodeImpl* child = parent->firstChild(); child; child = child->nextSibling())
                 if (child->id() == ChildId) {
                     ptr = static_cast<ElementImpl*>(child);
diff --git a/tdehtml/html/htmlparser.cpp b/tdehtml/html/htmlparser.cpp
index 31d3d4c17..1cbc746ef 100644
--- a/tdehtml/html/htmlparser.cpp
+++ b/tdehtml/html/htmlparser.cpp
@@ -135,8 +135,8 @@ TDEHTMLParser::TDEHTMLParser( TDEHTMLView *_parent, DocumentImpl *doc)
     HTMLWidget    = _parent;
     document      = doc;
 
-    blockStack = 0;
-    current = 0;
+    blockStack = nullptr;
+    current = nullptr;
 
     // ID_CLOSE_TAG == Num of tags
     forbiddenTag = new ushort[ID_CLOSE_TAG+1];
@@ -146,13 +146,13 @@ TDEHTMLParser::TDEHTMLParser( TDEHTMLView *_parent, DocumentImpl *doc)
 
 TDEHTMLParser::TDEHTMLParser( DOM::DocumentFragmentImpl *i, DocumentImpl *doc )
 {
-    HTMLWidget = 0;
+    HTMLWidget = nullptr;
     document = doc;
 
     forbiddenTag = new ushort[ID_CLOSE_TAG+1];
 
-    blockStack = 0;
-    current = 0;
+    blockStack = nullptr;
+    current = nullptr;
 
     reset();
 
@@ -193,10 +193,10 @@ void TDEHTMLParser::reset()
     inStrayTableContent = 0;
     m_inline = false;
 
-    form = 0;
-    map = 0;
+    form = nullptr;
+    map = nullptr;
     end = false;
-    isindex = 0;
+    isindex = nullptr;
 
     discard_until = 0;
 }
@@ -291,14 +291,14 @@ void TDEHTMLParser::parseToken(Token *t)
 #ifdef PARSER_DEBUG
             kdDebug( 6035 ) << "  --> resetting map!" << endl;
 #endif
-            map = 0;
+            map = nullptr;
         }
         if (form == n)
         {
 #ifdef PARSER_DEBUG
             kdDebug( 6035 ) << "   --> resetting form!" << endl;
 #endif
-            form = 0;
+            form = nullptr;
         }
         delete n;
     }
@@ -796,7 +796,7 @@ bool TDEHTMLParser::insertNode(NodeImpl *n, bool flat)
         default:
             if(current->isDocumentNode())
             {
-                if(current->firstChild() == 0) {
+                if(!current->firstChild()) {
                     e = new HTMLHtmlElementImpl(document);
                     insertNode(e);
                     handled = true;
@@ -823,7 +823,7 @@ bool TDEHTMLParser::insertNode(NodeImpl *n, bool flat)
 
 NodeImpl *TDEHTMLParser::getElement(Token* t)
 {
-    NodeImpl *n = 0;
+    NodeImpl *n = nullptr;
 
     switch(t->tid)
     {
@@ -916,7 +916,7 @@ NodeImpl *TDEHTMLParser::getElement(Token* t)
              !strcasecmp( t->attrs->getValue( ATTR_TYPE ), "image" ) )
         {
             if (TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered( doc()->completeURL( tdehtml::parseURL(t->attrs->getValue(ATTR_SRC)).string() ) ))
-                return 0;
+                return nullptr;
         }
         n = new HTMLInputElementImpl(document, form);
         break;
@@ -924,7 +924,7 @@ NodeImpl *TDEHTMLParser::getElement(Token* t)
         n = handleIsindex(t);
         if( !inBody ) {
             isindex = n;
-            n = 0;
+            n = nullptr;
         } else
             t->flat = true;
         break;
@@ -1043,7 +1043,7 @@ NodeImpl *TDEHTMLParser::getElement(Token* t)
         {
             TQString url = doc()->completeURL( tdehtml::parseURL(t->attrs->getValue(ATTR_SRC)).string() );
             if (TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered(url))
-                return 0;
+                return nullptr;
         }
         n = new HTMLImageElementImpl(document, form);
         break;
@@ -1179,7 +1179,7 @@ NodeImpl *TDEHTMLParser::getElement(Token* t)
         return n;
     case ID_NOLAYER:
 //        discard_until = ID_NOLAYER + ID_CLOSE_TAG;
-        return 0;
+        return nullptr;
         break;
     case ID_MARQUEE:
         n = new HTMLMarqueeElementImpl(document);
@@ -1211,11 +1211,11 @@ void TDEHTMLParser::processCloseTag(Token *t)
         // them prematurely
         return;
     case ID_FORM+ID_CLOSE_TAG:
-        form = 0;
+        form = nullptr;
         // this one is to get the right style on the body element
         break;
     case ID_MAP+ID_CLOSE_TAG:
-        map = 0;
+        map = nullptr;
         break;
     case ID_SELECT+ID_CLOSE_TAG:
         inSelect = false;
@@ -1232,7 +1232,7 @@ void TDEHTMLParser::processCloseTag(Token *t)
 #ifdef PARSER_DEBUG
     kdDebug( 6035 ) << "added the following children to " << current->nodeName().string() << endl;
     NodeImpl *child = current->firstChild();
-    while(child != 0)
+    while(child)
     {
         kdDebug( 6035 ) << "    " << child->nodeName().string() << endl;
         child = child->nextSibling();
@@ -1310,10 +1310,10 @@ void TDEHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
     // ### For now, if there is more than one, we will only make sure we close the residual style.
     int exceptionCode = 0;
     HTMLStackElem* curr = blockStack;
-    HTMLStackElem* maxElem = 0;
-    HTMLStackElem* endElem = 0;
-    HTMLStackElem* prev = 0;
-    HTMLStackElem* prevMaxElem = 0;
+    HTMLStackElem* maxElem = nullptr;
+    HTMLStackElem* endElem = nullptr;
+    HTMLStackElem* prev = nullptr;
+    HTMLStackElem* prevMaxElem = nullptr;
     bool advancedResidual = false; // ### if set we only close the residual style
     while (curr && curr != elem) {
         if (curr->level > elem->level) {
@@ -1369,8 +1369,8 @@ void TDEHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
         // in the block stack.
         // This will also affect how we ultimately reparent the block, since we want it to end up
         // under the reopened residual tags (e.g., the <i> in the above example.)
-        NodeImpl* prevNode = 0;
-        NodeImpl* currNode = 0;
+        NodeImpl* prevNode = nullptr;
+        NodeImpl* currNode = nullptr;
         currElem = maxElem;
         while (currElem->node != residualElem) {
             if (isResidualStyleTag(currElem->node->id())) {
@@ -1446,7 +1446,7 @@ void TDEHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
     // the node associated with the previous stack element so that when it gets popped,
     // it doesn't make the residual element the next current node.
     HTMLStackElem* currElem = maxElem;
-    HTMLStackElem* prevElem = 0;
+    HTMLStackElem* prevElem = nullptr;
     while (currElem != elem) {
         prevElem = currElem;
         currElem = currElem->next;
@@ -1458,7 +1458,7 @@ void TDEHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
     // Step 7: Reopen intermediate inlines, e.g., <b><p><i>Foo</b>Goo</p>.
     // In the above example, Goo should stay italic.
     curr = blockStack;
-    HTMLStackElem* residualStyleStack = 0;
+    HTMLStackElem* residualStyleStack = nullptr;
     while (curr && curr != endElem) {
         // We will actually schedule this tag for reopening
         // after we complete the close of this entire block.
@@ -1483,7 +1483,7 @@ void TDEHTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
         curr = blockStack;
     }
 
-    reopenResidualStyleTags(residualStyleStack, 0); // FIXME: Deal with stray table content some day
+    reopenResidualStyleTags(residualStyleStack, nullptr); // FIXME: Deal with stray table content some day
                                                     // if it becomes necessary to do so.
 }
 
@@ -1508,12 +1508,12 @@ void TDEHTMLParser::reopenResidualStyleTags(HTMLStackElem* elem, DOM::NodeImpl*
 
         // Set our strayTableContent boolean if needed, so that the reopened tag also knows
         // that it is inside a malformed table.
-        blockStack->strayTableContent = malformedTableParent != 0;
+        blockStack->strayTableContent = malformedTableParent != nullptr;
         if (blockStack->strayTableContent)
             inStrayTableContent++;
 
         // Clear our malformed table parent variable.
-        malformedTableParent = 0;
+        malformedTableParent = nullptr;
 
         // Update |current| manually to point to the new node.
         setCurrent(newNode);
@@ -1567,8 +1567,8 @@ void TDEHTMLParser::popBlock( int _id )
     }
 
     bool isAffectedByStyle = isAffectedByResidualStyle(Elem->id);
-    HTMLStackElem* residualStyleStack = 0;
-    NodeImpl* malformedTableParent = 0;
+    HTMLStackElem* residualStyleStack = nullptr;
+    NodeImpl* malformedTableParent = nullptr;
 
     Elem = blockStack;
 
@@ -1578,7 +1578,7 @@ void TDEHTMLParser::popBlock( int _id )
         {
             int strayTable = inStrayTableContent;
             popOneBlock();
-            Elem = 0;
+            Elem = nullptr;
 
             // This element was the root of some malformed content just inside an implicit or
             // explicit <tbody> or <tr>.
@@ -1588,7 +1588,7 @@ void TDEHTMLParser::popBlock( int _id )
                 NodeImpl* curr = current;
                 while (curr && curr->id() != ID_TABLE)
                     curr = curr->parentNode();
-                malformedTableParent = curr ? curr->parentNode() : 0;
+                malformedTableParent = curr ? curr->parentNode() : nullptr;
             }
         }
         else
@@ -1671,7 +1671,7 @@ void TDEHTMLParser::freeBlock()
 {
     while (blockStack)
         popOneBlock();
-    blockStack = 0;
+    blockStack = nullptr;
 }
 
 void TDEHTMLParser::createHead()
@@ -1688,7 +1688,7 @@ void TDEHTMLParser::createHead()
         kdDebug( 6035 ) << "creation of head failed!!!!" << endl;
 #endif
         delete head.get();
-        head = 0;
+        head = nullptr;
     }
 }
 
@@ -1703,7 +1703,7 @@ NodeImpl *TDEHTMLParser::handleIsindex( Token *t )
         n = new HTMLDivElementImpl( document, ID_DIV );
     NodeImpl *child = new HTMLHRElementImpl( document );
     n->addChild( child );
-    DOMStringImpl* a = t->attrs ? t->attrs->getValue(ATTR_PROMPT) : 0;
+    DOMStringImpl* a = t->attrs ? t->attrs->getValue(ATTR_PROMPT) : nullptr;
     DOMString text = i18n("This is a searchable index. Enter search keywords: ");
     if (a)
         text = a;
@@ -1726,6 +1726,6 @@ void TDEHTMLParser::startBody()
 
     if( isindex ) {
         insertNode( isindex, true /* don't decend into this node */ );
-        isindex = 0;
+        isindex = nullptr;
     }
 }
diff --git a/tdehtml/html/htmltokenizer.cpp b/tdehtml/html/htmltokenizer.cpp
index edf44d84f..06d6b52a0 100644
--- a/tdehtml/html/htmltokenizer.cpp
+++ b/tdehtml/html/htmltokenizer.cpp
@@ -126,8 +126,8 @@ static const char titleEnd [] = "</title";
 HTMLTokenizer::HTMLTokenizer(DOM::DocumentImpl *_doc, TDEHTMLView *_view)
 {
     view = _view;
-    buffer = 0;
-    scriptCode = 0;
+    buffer = nullptr;
+    scriptCode = nullptr;
     scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0;
     charsets = TDEGlobal::charsets();
     parser = new TDEHTMLParser(_view, _doc);
@@ -140,9 +140,9 @@ HTMLTokenizer::HTMLTokenizer(DOM::DocumentImpl *_doc, TDEHTMLView *_view)
 
 HTMLTokenizer::HTMLTokenizer(DOM::DocumentImpl *_doc, DOM::DocumentFragmentImpl *i)
 {
-    view = 0;
-    buffer = 0;
-    scriptCode = 0;
+    view = nullptr;
+    buffer = nullptr;
+    scriptCode = nullptr;
     scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0;
     charsets = TDEGlobal::charsets();
     parser = new TDEHTMLParser( i, _doc );
@@ -164,12 +164,12 @@ void HTMLTokenizer::reset()
 
     if ( buffer )
         TDEHTML_DELETE_QCHAR_VEC(buffer);
-    buffer = dest = 0;
+    buffer = dest = nullptr;
     size = 0;
 
     if ( scriptCode )
         TDEHTML_DELETE_QCHAR_VEC(scriptCode);
-    scriptCode = 0;
+    scriptCode = nullptr;
     scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0;
 
     if (m_autoCloseTimer) {
@@ -392,7 +392,7 @@ void HTMLTokenizer::scriptHandler()
     bool deferredScript = false;
 
     if ( effectiveScript ) {
-        CachedScript* cs = 0;
+        CachedScript* cs = nullptr;
 
         // forget what we just got, load from src url instead
         if ( !currentScriptSrc.isEmpty() && javascript &&
@@ -1118,7 +1118,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
             if(tagID >= ID_CLOSE_TAG)
                 tagID -= ID_CLOSE_TAG;
             else if ( !brokenScript && tagID == ID_SCRIPT ) {
-                DOMStringImpl* a = 0;
+                DOMStringImpl* a = nullptr;
                 bool foundTypeAttribute = false;
                 scriptSrc = scriptSrcCharset = TQString::null;
                 if ( currToken.attrs && /* potentially have a ATTR_SRC ? */
@@ -1132,7 +1132,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
                     if ( scriptSrcCharset.isEmpty() && view)
                         scriptSrcCharset = parser->doc()->view()->part()->encoding();
                     /* Check type before language, since language is deprecated */
-                    if ((a = currToken.attrs->getValue(ATTR_TYPE)) != 0 && !DOMString(a).string().isEmpty())
+                    if ((a = currToken.attrs->getValue(ATTR_TYPE)) && !DOMString(a).string().isEmpty())
                         foundTypeAttribute = true;
                     else
                         a = currToken.attrs->getValue(ATTR_LANGUAGE);
@@ -1571,7 +1571,7 @@ void HTMLTokenizer::setAutoClose( bool b ) {
 
 void HTMLTokenizer::end()
 {
-    if ( buffer == 0 ) {
+    if ( !buffer ) {
         emit finishedParsing();
         return;
     }
@@ -1586,9 +1586,9 @@ void HTMLTokenizer::end()
     if(scriptCode)
         TDEHTML_DELETE_QCHAR_VEC(scriptCode);
 
-    scriptCode = 0;
+    scriptCode = nullptr;
     scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0;
-    buffer = 0;
+    buffer = nullptr;
     emit finishedParsing();
 }
 
@@ -1625,7 +1625,7 @@ void HTMLTokenizer::finish()
             food.setUnicode(scriptCode+pos+1, scriptCodeSize-pos-1); // deep copy
         }
         TDEHTML_DELETE_QCHAR_VEC(scriptCode);
-        scriptCode = 0;
+        scriptCode = nullptr;
         scriptCodeSize = scriptCodeMaxSize = scriptCodeResync = 0;
         if (script)
             scriptHandler();
@@ -1643,7 +1643,7 @@ void HTMLTokenizer::finish()
 
 void HTMLTokenizer::processToken()
 {
-    KJSProxy *jsProxy = view ? view->part()->jScript() : 0L;
+    KJSProxy *jsProxy = view ? view->part()->jScript() : nullptr;
     if (jsProxy)
         jsProxy->setEventHandlerLineno(tagStartLineno+1);
     if ( dest > buffer )
diff --git a/tdehtml/html/htmltokenizer.h b/tdehtml/html/htmltokenizer.h
index a79f65edf..fdedede7d 100644
--- a/tdehtml/html/htmltokenizer.h
+++ b/tdehtml/html/htmltokenizer.h
@@ -63,8 +63,8 @@ namespace tdehtml {
     public:
         Token() {
             tid = 0;
-            attrs = 0;
-            text = 0;
+            attrs = nullptr;
+            text = nullptr;
             flat = false;
             //tqDebug("new token, creating %08lx", attrs);
         }
@@ -74,7 +74,7 @@ namespace tdehtml {
         }
         void addAttribute(DocumentImpl* doc, TQChar* buffer, const TQString& attrName, const DOMString& v)
         {
-            DOMStringImpl *value = 0;
+            DOMStringImpl *value = nullptr;
             NodeImpl::Id tid = 0;
             if(buffer->unicode()) {
 		tid = buffer->unicode();
@@ -87,7 +87,7 @@ namespace tdehtml {
 
             if (value && tid) {
                 if(!attrs) {
-                    attrs = new DOM::NamedAttrMapImpl(0);
+                    attrs = new DOM::NamedAttrMapImpl(nullptr);
                     attrs->ref();
                 }
                 if (!attrs->getValue(tid))
@@ -98,12 +98,12 @@ namespace tdehtml {
         {
             if(attrs) {
                 attrs->deref();
-                attrs = 0;
+                attrs = nullptr;
             }
             tid = 0;
             if(text) {
                 text->deref();
-                text = 0;
+                text = nullptr;
             }
             flat = false;
         }
@@ -122,7 +122,7 @@ class HTMLTokenizer : public Tokenizer, public CachedObjectClient
 {
     friend class TDEHTMLParser;
 public:
-    HTMLTokenizer(DOM::DocumentImpl *, TDEHTMLView * = 0);
+    HTMLTokenizer(DOM::DocumentImpl *, TDEHTMLView * = nullptr);
     HTMLTokenizer(DOM::DocumentImpl *, DOM::DocumentFragmentImpl *frag);
     virtual ~HTMLTokenizer();
 
diff --git a/tdehtml/java/kjavaapplet.h b/tdehtml/java/kjavaapplet.h
index dd13100f7..a807c71c0 100644
--- a/tdehtml/java/kjavaapplet.h
+++ b/tdehtml/java/kjavaapplet.h
@@ -62,7 +62,7 @@ public:
          STOPPED      = 5,
          DESTROYED    = 6
     } AppletState;
-    KJavaApplet( KJavaAppletWidget* _parent, KJavaAppletContext* _context = 0 );
+    KJavaApplet( KJavaAppletWidget* _parent, KJavaAppletContext* _context = nullptr );
     ~KJavaApplet();
 
     /**
diff --git a/tdehtml/java/kjavaappletcontext.cpp b/tdehtml/java/kjavaappletcontext.cpp
index 6d8af4667..5be4af07f 100644
--- a/tdehtml/java/kjavaappletcontext.cpp
+++ b/tdehtml/java/kjavaappletcontext.cpp
@@ -231,7 +231,7 @@ void KJavaAppletContext::received( const TQString& cmd, const TQStringList& arg
             /*
             TQString errorDetail(arg[1]);
             errorDetail.replace(TQRegExp(":\\s*"), ":\n");
-            KMessageBox::detailedError(0L, i18n("Java error while loading applet."), errorDetail);
+            KMessageBox::detailedError(nullptr, i18n("Java error while loading applet."), errorDetail);
             */
             if (applet)
                 applet->setFailed();
diff --git a/tdehtml/java/kjavaappletserver.cpp b/tdehtml/java/kjavaappletserver.cpp
index 6b546196b..a44c0a278 100644
--- a/tdehtml/java/kjavaappletserver.cpp
+++ b/tdehtml/java/kjavaappletserver.cpp
@@ -113,7 +113,7 @@ class KJavaAppletServerPrivate
 {
 friend class KJavaAppletServer;
 private:
-   KJavaAppletServerPrivate() : kssl( 0L ) {}
+   KJavaAppletServerPrivate() : kssl( nullptr ) {}
    ~KJavaAppletServerPrivate() {
        delete kssl;
    }
@@ -129,7 +129,7 @@ private:
    //TQValueList<TQByteArray> java_requests;
 };
 
-static KJavaAppletServer* self = 0;
+static KJavaAppletServer* self = nullptr;
 
 KJavaAppletServer::KJavaAppletServer()
 {
@@ -174,7 +174,7 @@ TQString KJavaAppletServer::appletLabel()
 
 KJavaAppletServer* KJavaAppletServer::allocateJavaServer()
 {
-   if( self == 0 )
+   if( !self )
    {
       self = new KJavaAppletServer();
       self->d->counter = 0;
@@ -208,7 +208,7 @@ void KJavaAppletServer::checkShutdown()
     if( self->d->counter == 0 )
     {
         delete self;
-        self = 0;
+        self = nullptr;
     }
 }
 
@@ -792,7 +792,7 @@ TQCString PermissionDialog::exec( const TQString & cert, const TQString & perm )
     TQSpacerItem* const spacer2 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
     dialogLayout->addItem( spacer2 );
 
-    TQHBoxLayout* const buttonLayout = new TQHBoxLayout( 0, 0, 6, "buttonLayout");
+    TQHBoxLayout* const buttonLayout = new TQHBoxLayout( nullptr, 0, 6, "buttonLayout");
 
     TQPushButton* const no = new TQPushButton( i18n("&No"), dialog, "no" );
     no->setDefault( true );
diff --git a/tdehtml/java/kjavaappletviewer.cpp b/tdehtml/java/kjavaappletviewer.cpp
index 237d74408..45ebfc9f4 100644
--- a/tdehtml/java/kjavaappletviewer.cpp
+++ b/tdehtml/java/kjavaappletviewer.cpp
@@ -48,7 +48,7 @@
 
 K_EXPORT_COMPONENT_FACTORY (kjavaappletviewer, KJavaAppletViewerFactory)
 
-TDEInstance *KJavaAppletViewerFactory::s_instance = 0;
+TDEInstance *KJavaAppletViewerFactory::s_instance = nullptr;
 
 KJavaAppletViewerFactory::KJavaAppletViewerFactory () {
     s_instance = new TDEInstance ("kjava");
@@ -67,7 +67,7 @@ KParts::Part *KJavaAppletViewerFactory::createPartObject
 //-----------------------------------------------------------------------------
 
 class KJavaServerMaintainer;
-static KJavaServerMaintainer * serverMaintainer = 0;
+static KJavaServerMaintainer * serverMaintainer = nullptr;
 
 class KJavaServerMaintainer {
 public:
@@ -215,7 +215,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *,
    m_browserextension (new KJavaAppletViewerBrowserExtension (this)),
    m_liveconnect (new KJavaAppletViewerLiveConnectExtension (this)),
    m_statusbar (new KParts::StatusBarExtension (this)),
-   m_statusbar_icon (0L),
+   m_statusbar_icon (nullptr),
    m_closed (true)
 {
     if (!serverMaintainer) {
@@ -368,7 +368,7 @@ bool KJavaAppletViewer::eventFilter (TQObject *o, TQEvent *e) {
 }
 
 KJavaAppletViewer::~KJavaAppletViewer () {
-    m_view = 0L;
+    m_view = nullptr;
     serverMaintainer->releaseContext (parent(), baseurl);
     if (m_statusbar_icon) {
         m_statusbar->removeStatusBarItem (m_statusbar_icon);
@@ -406,7 +406,7 @@ bool KJavaAppletViewer::openURL (const KURL & url) {
     else
         TQTimer::singleShot (10, this, TQ_SLOT (delayedCreateTimeOut ()));
     if (!applet->failed ())
-        emit started (0L);
+        emit started (nullptr);
     return url.isValid ();
 }
 
diff --git a/tdehtml/java/kjavaappletwidget.cpp b/tdehtml/java/kjavaappletwidget.cpp
index 71fcf05e7..4bd496aa7 100644
--- a/tdehtml/java/kjavaappletwidget.cpp
+++ b/tdehtml/java/kjavaappletwidget.cpp
@@ -86,7 +86,7 @@ void KJavaAppletWidget::setWindow( WId w )
         kdDebug(6100) << "swallowing our window: " << m_swallowTitle
                       << ", window id = " << w << endl;
         delete d->tmplabel;
-        d->tmplabel = 0;
+        d->tmplabel = nullptr;
 
         // disconnect from KWM events
         disconnect( m_kwm, TQ_SIGNAL( windowAdded( WId ) ),
diff --git a/tdehtml/java/kjavaappletwidget.h b/tdehtml/java/kjavaappletwidget.h
index 08719b1d5..0400789c3 100644
--- a/tdehtml/java/kjavaappletwidget.h
+++ b/tdehtml/java/kjavaappletwidget.h
@@ -77,7 +77,7 @@ class KJavaAppletWidget : public QXEmbed
 {
     TQ_OBJECT
 public:
-    KJavaAppletWidget( TQWidget* parent=0, const char* name=0 );
+    KJavaAppletWidget( TQWidget* parent=nullptr, const char* name=nullptr );
 
    ~KJavaAppletWidget();
 
diff --git a/tdehtml/java/kjavadownloader.cpp b/tdehtml/java/kjavadownloader.cpp
index b58465d7f..1ca40c430 100644
--- a/tdehtml/java/kjavadownloader.cpp
+++ b/tdehtml/java/kjavadownloader.cpp
@@ -149,7 +149,7 @@ void KJavaDownloader::slotResult( TDEIO::Job* )
     {
         server->sendURLData( d->loaderID, FINISHED, d->file );
     }
-    d->job = 0L; // signal TDEIO::Job::result deletes itself
+    d->job = nullptr; // signal TDEIO::Job::result deletes itself
     server->removeDataJob( d->loaderID ); // will delete this
     KJavaAppletServer::freeJavaServer();
 }
@@ -161,7 +161,7 @@ void KJavaDownloader::jobCommand( int cmd )
         case KJAS_STOP: {
             kdDebug(6100) << "jobCommand(" << d->loaderID << ") stop" << endl;
             d->job->kill();
-            d->job = 0L; // TDEIO::Job::kill deletes itself
+            d->job = nullptr; // TDEIO::Job::kill deletes itself
             KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer();
             server->removeDataJob( d->loaderID ); // will delete this
             KJavaAppletServer::freeJavaServer();
@@ -204,7 +204,7 @@ KJavaUploader::KJavaUploader( int ID, const TQString& url )
 
     d->loaderID = ID;
     d->url = new KURL( url );
-    d->job = 0L;
+    d->job = nullptr;
     d->finished = false;
 }
 
@@ -235,7 +235,7 @@ void KJavaUploader::slotDataRequest( TDEIO::Job*, TQByteArray& qb )
     qb.resize( d->file.size() );
     KJavaAppletServer* server = KJavaAppletServer::allocateJavaServer();
     if (d->file.size() == 0) {
-        d->job = 0L; // eof, job deletes itself
+        d->job = nullptr; // eof, job deletes itself
         server->removeDataJob( d->loaderID ); // will delete this
     } else {
         memcpy( qb.data(), d->file.data(), d->file.size() );
@@ -276,7 +276,7 @@ void KJavaUploader::slotResult( TDEIO::Job* )
     }
     else // shouldn't come here
         kdError(6100) << "slotResult(" << d->loaderID << ") job:" << d->job << endl;
-    d->job = 0L; // signal TDEIO::Job::result deletes itself
+    d->job = nullptr; // signal TDEIO::Job::result deletes itself
     server->removeDataJob( d->loaderID ); // will delete this
     KJavaAppletServer::freeJavaServer();
 }
diff --git a/tdehtml/misc/arena.cpp b/tdehtml/misc/arena.cpp
index e2513ba36..99717c6d8 100644
--- a/tdehtml/misc/arena.cpp
+++ b/tdehtml/misc/arena.cpp
@@ -70,7 +70,7 @@ static int i = 0;
 #define FREELIST_MAX 50
 #define LARGE_ALLOCATION_CEIL(pool) (pool)->arenasize * 256
 #define MAX_DISCRETE_ALLOCATION(pool) (pool)->arenasize * 32
-static Arena *arena_freelist = 0;
+static Arena *arena_freelist = nullptr;
 static int freelist_count = 0;
 
 #define ARENA_DEFAULT_ALIGN  sizeof(double)
@@ -105,7 +105,7 @@ void InitArenaPool(ArenaPool *pool, const char* /*name*/,
      if (align == 0)
          align = ARENA_DEFAULT_ALIGN;
      pool->mask = BITMASK(CeilingLog2(align));
-     pool->first.next = NULL;
+     pool->first.next = nullptr;
      pool->first.base = pool->first.avail = pool->first.limit =
          (uword)ARENA_ALIGN(pool, &pool->first + 1);
      pool->current = &pool->first;
@@ -156,14 +156,14 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb)
                 VALGRIND_MEMPOOL_ALLOC(a->base, rp, nb);
                 return rp;
             }
-        } while( NULL != (a = a->next) );
+        } while( nullptr != (a = a->next) );
     }
 
     /* attempt to allocate from arena_freelist */
     {
         Arena *p; /* previous pointer, for unlinking from freelist */
 
-        for ( a = p = arena_freelist; a != NULL ; p = a, a = a->next ) {
+        for ( a = p = arena_freelist; a ; p = a, a = a->next ) {
             if ( a->base +nb <= a->limit )  {
                 if ( p == arena_freelist )
                     arena_freelist = a->next;
@@ -178,7 +178,7 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb)
                 a->next = pool->current->next;
                 pool->current->next = a;
                 pool->current = a;
-                if ( 0 == pool->first.next )
+                if ( nullptr == pool->first.next )
                     pool->first.next = a;
                 freelist_count--;
                 return(rp);
@@ -224,7 +224,7 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb)
     }
 
     /* we got to here, and there's no memory to allocate */
-    return(0);
+    return(nullptr);
 } /* --- end ArenaAllocate() --- */
 
 /*
@@ -263,8 +263,8 @@ static void FreeArenaList(ArenaPool *pool, Arena *head, bool reallyFree)
                 printf("Free: %d\n", i);
             }
 #endif
-            free(a); a = 0;
-        } while ((a = *ap) != 0);
+            free(a); a = nullptr;
+        } while ((a = *ap) != nullptr);
     } else {
         /* Insert as much of the arena chain as we can hold at the front of the freelist. */
         do {
@@ -288,7 +288,7 @@ static void FreeArenaList(ArenaPool *pool, Arena *head, bool reallyFree)
         }                                    
         *ap = arena_freelist;
         arena_freelist = a;
-        head->next = 0;
+        head->next = nullptr;
     }
     pool->current = head;
 }
@@ -324,10 +324,10 @@ void ArenaFinish()
 #endif
     for (a = arena_freelist; a; a = next) {
         next = a->next;
-        free(a); a = 0;
+        free(a); a = nullptr;
     }
     freelist_count = 0;
-    arena_freelist = NULL;
+    arena_freelist = nullptr;
 }
 
 } // namespace
diff --git a/tdehtml/misc/decoder.cpp b/tdehtml/misc/decoder.cpp
index 419b4a2f0..e231085e4 100644
--- a/tdehtml/misc/decoder.cpp
+++ b/tdehtml/misc/decoder.cpp
@@ -53,13 +53,13 @@ Decoder::Decoder()
     // latin1
     m_codec = TQTextCodec::codecForMib(4);
     m_decoder = m_codec->makeDecoder();
-    enc = 0;
+    enc = nullptr;
     m_type = DefaultEncoding;
     body = false;
     beginning = true;
     visualRTL = false;
     m_autoDetectLanguage = SemiautomaticDetection;
-    kc = NULL;
+    kc = nullptr;
 }
 
 Decoder::~Decoder()
@@ -99,14 +99,14 @@ void Decoder::setEncoding(const char *_encoding, EncodingType type)
     bool b;
     TQTextCodec *codec = TDEGlobal::charsets()->codecForName(enc, b);
     if (!b)
-        codec = 0;
+        codec = nullptr;
 
     if (type == EncodingFromMetaTag || type  == EncodingFromXMLHeader) {
         //Sometimes the codec specified is absurd, i.e. UTF-16 despite
         //us decoding a meta tag as ASCII. In that case, ignore it.
         if (codec &&
             (codec->mibEnum() == 1000)) //UTF16 or similar.
-                codec = 0;
+                codec = nullptr;
     }
 
     if (codec && codec->mibEnum() == 11)  {
@@ -249,13 +249,13 @@ TQString Decoder::decode(const char *data, int len)
                     (nul_count_even == 5 && nul_count_odd == 0))
                     autoDetectedEncoding = "ISO-10646-UCS-2";
                 else
-                    autoDetectedEncoding = 0;
+                    autoDetectedEncoding = nullptr;
             } else {
-                autoDetectedEncoding = 0;
+                autoDetectedEncoding = nullptr;
             }
 
             // If we found a BOM, use the encoding it implies.
-            if (autoDetectedEncoding != 0) {
+            if (autoDetectedEncoding) {
                 m_type = AutoDetectedEncoding;
                 m_codec = TQTextCodec::codecForName(autoDetectedEncoding);
                 assert(m_codec);
@@ -488,7 +488,7 @@ TQString Decoder::decode(const char *data, int len)
         case Decoder::Thai:
         case Decoder::Unicode:
             // huh. somethings broken in this code ### FIXME
-            enc = 0; //Reset invalid codec we tried, so we get back to latin1 fallback.
+            enc = nullptr; //Reset invalid codec we tried, so we get back to latin1 fallback.
             break;
         }
 
diff --git a/tdehtml/misc/guess_ja.cpp b/tdehtml/misc/guess_ja.cpp
index 2a4e82215..0d1caba40 100644
--- a/tdehtml/misc/guess_ja.cpp
+++ b/tdehtml/misc/guess_ja.cpp
@@ -308,7 +308,7 @@ guess_arc guess_utf8_ar[11] = {
 enum JapaneseCode::Type JapaneseCode::guess_jp(const char *buf, int buflen)
 {
     int i;
-    guess_dfa *top = NULL;
+    guess_dfa *top = nullptr;
 
     for (i=0; i<buflen; i++) {
         int c = (unsigned char)buf[i];
diff --git a/tdehtml/misc/knsplugininstaller.cpp b/tdehtml/misc/knsplugininstaller.cpp
index 44e74b976..badf6a737 100644
--- a/tdehtml/misc/knsplugininstaller.cpp
+++ b/tdehtml/misc/knsplugininstaller.cpp
@@ -136,7 +136,7 @@ bool KNSPluginInstallEngine::loadXmlConfig()
     if(m_pluginsXmlConfig.isEmpty())
     {
         TQString tmpFile;
-        if(TDEIO::NetAccess::download(m_pluginsListFileURL, tmpFile, NULL)) {
+        if(TDEIO::NetAccess::download(m_pluginsListFileURL, tmpFile, nullptr)) {
             TQFile f(tmpFile);
             if(!f.open(IO_ReadOnly))
                 return false;
@@ -290,7 +290,7 @@ void KNSPluginInstallEngine::slotDownloadResult(TDEIO::Job *job)
     kdDebug(DEBUG_NUMBER) << "COPY FILE " << m_tmpPluginFileName << endl;
 
     // zero the download job pointer
-    m_downloadJob = NULL;
+    m_downloadJob = nullptr;
 }
 
 void KNSPluginInstallEngine::slotCopyProgress(TDEIO::Job *, unsigned long percent)
@@ -505,7 +505,7 @@ void KNSPluginWizard::showPage(TQWidget *page)
         TQString tmpFile;
         if(info.licenceURL().isValid()) 
             // retrieve the licence if we have an url
-            if(TDEIO::NetAccess::download(info.licenceURL(), tmpFile, NULL)) {
+            if(TDEIO::NetAccess::download(info.licenceURL(), tmpFile, nullptr)) {
                     TQFile f(tmpFile);
                     if(f.open(IO_ReadOnly)) {
                         TQTextStream stream(&f);
diff --git a/tdehtml/misc/loader.cpp b/tdehtml/misc/loader.cpp
index 293c7c200..05998dd02 100644
--- a/tdehtml/misc/loader.cpp
+++ b/tdehtml/misc/loader.cpp
@@ -88,7 +88,7 @@ struct LRUList {
     CachedObject* m_head;
     CachedObject* m_tail;
 
-    LRUList() : m_head(0), m_tail(0) {}
+    LRUList() : m_head(nullptr), m_tail(nullptr) {}
 };
 
 static LRUList m_LRULists[MAX_LRU_LISTS];
@@ -111,7 +111,7 @@ void CachedObject::finish()
 bool CachedObject::isExpired() const
 {
     if (!m_expireDate) return false;
-    time_t now = time(0);
+    time_t now = time(nullptr);
     return (difftime(now, m_expireDate) >= 0);
 }
 
@@ -254,7 +254,7 @@ void CachedCSSStyleSheet::data( TQBuffer &buffer, bool eof )
     setSize(buffer.buffer().size());
 
 //     TQString charset = checkCharset( buffer.buffer() );
-    TQTextCodec* c = 0;
+    TQTextCodec* c = nullptr;
     if (!m_charset.isEmpty()) {
         c = TDEGlobal::charsets()->codecForName(m_charset);
         if(c->mibEnum() == 11)  c = TQTextCodec::codecForName("iso8859-8-i");
@@ -311,7 +311,7 @@ TQString CachedCSSStyleSheet::checkCharset(const TQByteArray& buffer ) const
     {
         // the string until "; is the charset name
         char *p = strchr(d+10, '"');
-        if (p == 0) return m_charset;
+        if (!p) return m_charset;
         TQString charset = TQString::fromAscii(d+10, p-(d+10));
 	return charset;
     }
@@ -471,18 +471,18 @@ CachedImage::CachedImage(DocLoader* dl, const DOMString &url, TDEIO::CacheContro
 {
     static const TQString &acceptHeader = TDEGlobal::staticTQString( buildAcceptHeader() );
 
-    m = 0;
-    p = 0;
-    pixPart = 0;
-    bg = 0;
-    scaled = 0;
+    m = nullptr;
+    p = nullptr;
+    pixPart = nullptr;
+    bg = nullptr;
+    scaled = nullptr;
     bgColor = tqRgba( 0, 0, 0, 0xFF );
     typeChecked = false;
     isFullyTransparent = false;
     monochrome = false;
-    formatType = 0;
+    formatType = nullptr;
     m_status = Unknown;
-    imgSource = 0;
+    imgSource = nullptr;
     setAccept( acceptHeader );
     m_showAnimations = dl->showAnimations();
 
@@ -537,7 +537,7 @@ const TQPixmap &CachedImage::tiled_pixmap(const TQColor& newc, int xWidth, int x
     if ( ( (bgColor != bgTransparent) && (bgColor != newc.rgb()) ) ||
          ( bgSize != TQSize(xWidth, xHeight)) )
     {
-        delete bg; bg = 0;
+        delete bg; bg = nullptr;
     }
 
     if (bg)
@@ -731,7 +731,7 @@ void CachedImage::movieStatus(int status)
         // we have to delete our tiled bg variant here
         // because the frame has changed (in order to keep it in sync)
         delete bg;
-        bg = 0;
+        bg = nullptr;
     }
 
     if((status == TQMovie::EndOfMovie && (!m || m->frameNumber() <= 1)) ||
@@ -790,7 +790,7 @@ void CachedImage::setShowAnimations( TDEHTMLSettings::KAnimationAdvice showAnima
         m->disconnectStatus( this, TQ_SLOT( movieStatus( int ) ));
         m->disconnectResize( this, TQ_SLOT( movieResize( const TQSize& ) ) );
         TQTimer::singleShot(0, this, TQ_SLOT( deleteMovie()));
-        imgSource = 0;
+        imgSource = nullptr;
     }
 }
 
@@ -807,25 +807,25 @@ void CachedImage::resumeAnimations()
 
 void CachedImage::deleteMovie()
 {
-    delete m; m = 0;
+    delete m; m = nullptr;
 }
 
 void CachedImage::clear()
 {
-    delete m;   m = 0;
-    delete p;   p = 0;
-    delete bg;  bg = 0;
-    delete scaled;  scaled = 0;
+    delete m;   m = nullptr;
+    delete p;   p = nullptr;
+    delete bg;  bg = nullptr;
+    delete scaled;  scaled = nullptr;
     bgColor = tqRgba( 0, 0, 0, 0xff );
     bgSize = TQSize(-1,-1);
-    delete pixPart; pixPart = 0;
+    delete pixPart; pixPart = nullptr;
 
-    formatType = 0;
+    formatType = nullptr;
     typeChecked = false;
     setSize(0);
 
     // No need to delete imageSource - TQMovie does it for us
-    imgSource = 0;
+    imgSource = nullptr;
 }
 
 void CachedImage::data ( TQBuffer &_buffer, bool eof )
@@ -840,7 +840,7 @@ void CachedImage::data ( TQBuffer &_buffer, bool eof )
         {
             formatType = TQImageDecoder::formatName( (const uchar*)_buffer.buffer().data(), _buffer.size());
             if ( formatType && strcmp( formatType, "PNG" ) == 0 )
-                formatType = 0; // Some png files contain multiple images, we want to show only the first one
+                formatType = nullptr; // Some png files contain multiple images, we want to show only the first one
         }
 
         typeChecked = true;
@@ -875,7 +875,7 @@ void CachedImage::data ( TQBuffer &_buffer, bool eof )
             {
             	TQBuffer buffer(_buffer.buffer());
             	buffer.open(IO_ReadOnly);
-                TQImageIO io( &buffer, 0 );
+                TQImageIO io( &buffer, nullptr );
                 io.setGamma(2.2); // hardcoded "reasonable value"
                 bool result = io.read();
                 if (result) p->convertFromImage(io.image(), 0);
@@ -936,7 +936,7 @@ Request::Request(DocLoader* dl, CachedObject *_object, bool _incremental)
 
 Request::~Request()
 {
-    object->setRequest(0);
+    object->setRequest(nullptr);
 }
 
 // ------------------------------------------------------------------------------------------
@@ -945,7 +945,7 @@ DocLoader::DocLoader(TDEHTMLPart* part, DocumentImpl* doc)
 {
     m_cachePolicy = TDEIO::CC_Verify;
     m_expireDate = 0;
-    m_creationDate = time(0);
+    m_creationDate = time(nullptr);
     m_bautoloadImages = true;
     m_showAnimations = TDEHTMLSettings::KAnimationEnabled;
     m_part = part;
@@ -965,7 +965,7 @@ void DocLoader::setCacheCreationDate(time_t _creationDate)
     if (_creationDate)
        m_creationDate = _creationDate;
     else
-       m_creationDate = time(0); // Now
+       m_creationDate = time(nullptr); // Now
 }
 
 void DocLoader::setExpireDate(time_t _expireDate, bool relative)
@@ -1023,13 +1023,13 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL)
     if ( !fullURL.isValid() || \
          ( m_part && m_part->onlyLocalReferences() && fullURL.protocol() != "file" && fullURL.protocol() != "data") || \
          doRedirectCheck && ( tdeApp && m_doc && !tdeApp->authorizeURLAction("redirect", m_doc->URL(), fullURL))) \
-         return 0L;
+         return nullptr;
 
 CachedImage *DocLoader::requestImage( const DOM::DOMString &url)
 {
     DOCLOADER_SECCHECK(true);
 
-    CachedImage* i = Cache::requestObject<CachedImage, CachedObject::Image>( this, fullURL, 0);
+    CachedImage* i = Cache::requestObject<CachedImage, CachedObject::Image>( this, fullURL, nullptr);
 
     if (i && i->status() == CachedObject::Unknown && autoloadImages())
         Cache::loader()->load(this, i, true);
@@ -1054,9 +1054,9 @@ CachedScript *DocLoader::requestScript( const DOM::DOMString &url, const TQStrin
     DOCLOADER_SECCHECK(true);
     if ( ! TDEHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(fullURL.host()) ||
            TDEHTMLFactory::defaultHTMLSettings()->isAdFiltered(fullURL.url()))
-	return 0L;
+	return nullptr;
 
-    CachedScript* s = Cache::requestObject<CachedScript, CachedObject::Script>( this, fullURL, 0 );
+    CachedScript* s = Cache::requestObject<CachedScript, CachedObject::Script>( this, fullURL, nullptr );
     if ( s && !charset.isEmpty() )
         s->setCharset( charset );
     return s;
@@ -1326,23 +1326,23 @@ TDEIO::Job *Loader::jobForRequest( const DOM::DOMString &url ) const
             return static_cast<TDEIO::Job *>( it.currentKey() );
     }
 
-    return 0;
+    return nullptr;
 }
 
 // ----------------------------------------------------------------------------
 
 
-TQDict<CachedObject> *Cache::cache = 0;
-TQPtrList<DocLoader>* Cache::docloader = 0;
-TQPtrList<CachedObject> *Cache::freeList = 0;
-Loader *Cache::m_loader = 0;
+TQDict<CachedObject> *Cache::cache = nullptr;
+TQPtrList<DocLoader>* Cache::docloader = nullptr;
+TQPtrList<CachedObject> *Cache::freeList = nullptr;
+Loader *Cache::m_loader = nullptr;
 
 int Cache::maxSize = DEFCACHESIZE;
 int Cache::totalSizeOfLRU;
 
-TQPixmap *Cache::nullPixmap = 0;
-TQPixmap *Cache::brokenPixmap = 0;
-TQPixmap *Cache::blockedPixmap = 0;
+TQPixmap *Cache::nullPixmap = nullptr;
+TQPixmap *Cache::brokenPixmap = nullptr;
+TQPixmap *Cache::blockedPixmap = nullptr;
 
 void Cache::init()
 {
@@ -1412,13 +1412,13 @@ void Cache::clear()
     assert(!crash);
 #endif
 
-    delete cache; cache = 0;
-    delete nullPixmap; nullPixmap = 0;
-    delete brokenPixmap; brokenPixmap = 0;
-    delete blockedPixmap; blockedPixmap = 0;
-    delete m_loader;  m_loader = 0;
-    delete docloader; docloader = 0;
-    delete freeList; freeList = 0;
+    delete cache; cache = nullptr;
+    delete nullPixmap; nullPixmap = nullptr;
+    delete brokenPixmap; brokenPixmap = nullptr;
+    delete blockedPixmap; blockedPixmap = nullptr;
+    delete m_loader;  m_loader = nullptr;
+    delete docloader; docloader = nullptr;
+    delete freeList; freeList = nullptr;
 }
 
 template<typename CachedObjectType, enum CachedObject::Type CachedType>
@@ -1431,12 +1431,12 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c
 
     if ( o && o->type() != CachedType ) {
         removeCacheEntry( o );
-        o = 0;
+        o = nullptr;
     }
 
     if ( o && dl->needReload( o, url ) ) {
-        o = 0;
-        assert( cache->find( url ) == 0 );
+        o = nullptr;
+        assert(!cache->find( url ));
     }
 
     if(!o)
@@ -1533,7 +1533,7 @@ void Cache::statistics()
         {
             CachedImage *im = static_cast<CachedImage *>(o);
             images++;
-            if(im->m != 0)
+            if(im->m)
             {
                 movie++;
                 msize += im->size();
@@ -1623,12 +1623,12 @@ void Cache::removeFromLRUList(CachedObject *object)
     LRUList* list = getLRUListFor(object);
     CachedObject *&head = getLRUListFor(object)->m_head;
 
-    if (next == 0 && prev == 0 && head != object) {
+    if (!next && !prev && head != object) {
         return;
     }
 
-    object->m_next = 0;
-    object->m_prev = 0;
+    object->m_next = nullptr;
+    object->m_prev = nullptr;
 
     if (next)
         next->m_prev = prev;
@@ -1661,7 +1661,7 @@ void Cache::insertInLRUList(CachedObject *object)
         head->m_prev = object;
     head = object;
 
-    if (object->m_next == 0)
+    if (!object->m_next)
         list->m_tail = object;
 
     totalSizeOfLRU += object->size();
diff --git a/tdehtml/misc/loader.h b/tdehtml/misc/loader.h
index 826759098..45324bd0e 100644
--- a/tdehtml/misc/loader.h
+++ b/tdehtml/misc/loader.h
@@ -106,12 +106,12 @@ namespace tdehtml
 	    m_status = Pending;
             m_accessCount = 0;
 	    m_cachePolicy = _cachePolicy;
-	    m_request = 0;
+	    m_request = nullptr;
             m_deleted = false;
             m_free = false;
             m_hadError = false;
             m_wasBlocked = false;
-            m_prev = m_next = 0;
+            m_prev = m_next = nullptr;
 	}
         virtual ~CachedObject();
 
diff --git a/tdehtml/misc/loader_jpeg.cpp b/tdehtml/misc/loader_jpeg.cpp
index 61f091105..269b690a9 100644
--- a/tdehtml/misc/loader_jpeg.cpp
+++ b/tdehtml/misc/loader_jpeg.cpp
@@ -523,14 +523,14 @@ again:
 
 TQImageFormat* tdehtml::KJPEGFormatType::decoderFor(const unsigned char* buffer, int length)
 {
-    if(length < 3) return 0;
+    if(length < 3) return nullptr;
 
     if(buffer[0] == 0377 &&
        buffer[1] == 0330 &&
        buffer[2] == 0377)
          return new KJPEGFormat;
 
-    return 0;
+    return nullptr;
 }
 
 const char* tdehtml::KJPEGFormatType::formatName() const
diff --git a/tdehtml/misc/multimap.h b/tdehtml/misc/multimap.h
index 125e8e07d..ba7dcf936 100644
--- a/tdehtml/misc/multimap.h
+++ b/tdehtml/misc/multimap.h
@@ -80,7 +80,7 @@ static inline unsigned int stupidHash(void* ptr)
 
 class PtrListEntry {
 public:
-    PtrListEntry(unsigned int log_size) : count(0), log_size(log_size), search(log_size), next(0) {
+    PtrListEntry(unsigned int log_size) : count(0), log_size(log_size), search(log_size), next(nullptr) {
 //         entry = new T* [size];
         assert(log_size < MAX_PTRLIST_SIZE);
         entry = (void**)calloc ((1<<log_size), sizeof(void*));
@@ -93,12 +93,12 @@ public:
         unsigned int t_size = size();
         if (count == t_size) return false;
         unsigned int hash = stupidHash(e);
-        void** firstFree = 0;
+        void** firstFree = nullptr;
         // Only let elements be placed 'search' spots from their hash
         for(unsigned int j=0; j<search; j++) {
             unsigned int i = (hash + j) & (t_size-1); // modulo size
             // We need check to all hashes in 'search' to garuantee uniqueness
-            if (entry[i] == 0) {
+            if (!entry[i]) {
                 if (!firstFree)
                     firstFree = entry + i;
             } else
@@ -140,7 +140,7 @@ public:
         for(unsigned int j=0; j<search; j++) {
             unsigned int i = (hash + j) & (size-1); // modulo size
             if (entry[i] == e) {
-                entry[i] = 0;
+                entry[i] = nullptr;
                 count--;
                 return true;
             }
@@ -184,7 +184,7 @@ public:
 template<class T>
 class MultiMapPtrList {
 public:
-    MultiMapPtrList(unsigned int init_size= 16) : m_first(0), m_current(0), m_pos(0) {
+    MultiMapPtrList(unsigned int init_size= 16) : m_first(nullptr), m_current(nullptr), m_pos(0) {
         assert(init_size > 0);
         unsigned int s = init_size - 1;
         unsigned int log_size = 0;
@@ -194,7 +194,7 @@ public:
         }
         m_first = new PtrListEntry(log_size);
     }
-    MultiMapPtrList(const MultiMapPtrList& ptrList) : m_first(0), m_current(0), m_pos(0) {
+    MultiMapPtrList(const MultiMapPtrList& ptrList) : m_first(nullptr), m_current(nullptr), m_pos(0) {
         unsigned int t_count = ptrList.count();
         unsigned int log_size = 0;
         while (t_count > 0) {
@@ -210,7 +210,7 @@ public:
             unsigned int t_size = t_current->size();
             for(unsigned int i=0; i < t_size; i++) {
                 void* e = t_current->at(i);
-                if (e != 0) {
+                if (e) {
                     bool t = m_first->insert(e);
                     if (!t) {
                         // Make a new, but keep the size
@@ -233,7 +233,7 @@ public:
         }
     }
     void append(T* e) {
-        PtrListEntry *t_last = 0, *t_current = m_first;
+        PtrListEntry *t_last = nullptr, *t_current = m_first;
         int count = 0;
         while (t_current) {
             if (t_current->insert(e)) return;
@@ -258,7 +258,7 @@ public:
         }*/
     }
     void remove(T* e) {
-        PtrListEntry *t_next, *t_last = 0, *t_current = m_first;
+        PtrListEntry *t_next, *t_last = nullptr, *t_current = m_first;
         // Remove has to check every PtrEntry.
         while (t_current) {
             t_next = t_current->next;
@@ -315,12 +315,12 @@ public:
     }
     T* current() {
         if (!m_current)
-            return (T*)0;
+            return nullptr;
         else
             return (T*)m_current->at(m_pos);
     }
     T* next() {
-        if (!m_current) return (T*)0;
+        if (!m_current) return nullptr;
         m_pos++;
         if (m_pos >= m_current->size()) {
             m_current = m_current->next;
diff --git a/tdehtml/misc/shared.h b/tdehtml/misc/shared.h
index d99b327c6..c9ae654f5 100644
--- a/tdehtml/misc/shared.h
+++ b/tdehtml/misc/shared.h
@@ -49,7 +49,7 @@ protected:
 template<class type> class TreeShared
 {
 public:
-    TreeShared() { _ref = 0; m_parent = 0; /*counter++;*/ }
+    TreeShared() { _ref = 0; m_parent = nullptr; /*counter++;*/ }
     TreeShared( type *parent ) { _ref=0; m_parent = parent; /*counter++;*/ }
     ~TreeShared() { /*counter--;*/ }
 
@@ -85,22 +85,22 @@ template <class T> bool operator==(const T *a, const SharedPtr<T> &b);
 template <class T> class SharedPtr
 {
 public:
-    SharedPtr() : m_ptr(0) {}
+    SharedPtr() : m_ptr(nullptr) {}
     explicit SharedPtr(T *ptr) : m_ptr(ptr) { if (m_ptr) m_ptr->ref(); }
     SharedPtr(const SharedPtr &o) : m_ptr(o.m_ptr) { if (m_ptr) m_ptr->ref(); }
     ~SharedPtr() { if (m_ptr) m_ptr->deref(); }
 
-    bool isNull() const { return m_ptr == 0; }
-    bool notNull() const { return m_ptr != 0; }
+    bool isNull() const { return m_ptr == nullptr; }
+    bool notNull() const { return m_ptr != nullptr; }
 
-    void reset() { if (m_ptr) m_ptr->deref(); m_ptr = 0; }
+    void reset() { if (m_ptr) m_ptr->deref(); m_ptr = nullptr; }
     void reset(T *o) { if (o) o->ref(); if (m_ptr) m_ptr->deref(); m_ptr = o; }
 
     T * get() const { return m_ptr; }
     T &operator*() const { return *m_ptr; }
     T *operator->() const { return m_ptr; }
 
-    bool operator!() const { return m_ptr == 0; }
+    bool operator!() const { return m_ptr == nullptr; }
 
     template <class C> friend bool operator==(const SharedPtr<C> &a, const SharedPtr<C> &b);
     template <class C> friend bool operator==(const SharedPtr<C> &a, const C *b);
diff --git a/tdehtml/misc/stringit.cpp b/tdehtml/misc/stringit.cpp
index f4bea427f..d048e0903 100644
--- a/tdehtml/misc/stringit.cpp
+++ b/tdehtml/misc/stringit.cpp
@@ -44,7 +44,7 @@ void TokenizerString::clear()
 {
     m_pushedChar1 = 0;
     m_pushedChar2 = 0;
-    m_currentChar = 0;
+    m_currentChar = nullptr;
     m_currentString.clear();
     m_substrings.clear();
     m_lines = 0;
diff --git a/tdehtml/misc/stringit.h b/tdehtml/misc/stringit.h
index 74cdd471e..db29e4ba1 100644
--- a/tdehtml/misc/stringit.h
+++ b/tdehtml/misc/stringit.h
@@ -42,7 +42,7 @@ class DOMStringIt
 {
 public:
     DOMStringIt()
-	{ s = 0, l = 0; lines = 0; }
+	{ s = nullptr, l = 0; lines = 0; }
     DOMStringIt(TQChar *str, uint len)
 	{ s = str, l = len; lines = 0; }
     DOMStringIt(const TQString &str)
@@ -84,11 +84,11 @@ class TokenizerSubstring
 {
     friend class TokenizerString;
 public:    
-    TokenizerSubstring() : m_length(0), m_current(0) {}
-    TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? 0 : str.unicode()) {}
-    TokenizerSubstring(const TQChar *str, int length) : m_length(length), m_current(length == 0 ? 0 : str) {}
+    TokenizerSubstring() : m_length(0), m_current(nullptr) {}
+    TokenizerSubstring(const TQString &str) : m_string(str), m_length(str.length()), m_current(m_length == 0 ? nullptr : str.unicode()) {}
+    TokenizerSubstring(const TQChar *str, int length) : m_length(length), m_current(length == 0 ? nullptr : str) {}
 
-    void clear() { m_length = 0; m_current = 0; }
+    void clear() { m_length = 0; m_current = nullptr; }
 
     void appendTo(TQString &str) const {
         if (m_string.unicode() == m_current) {
@@ -110,7 +110,7 @@ class TokenizerString
 {
 
 public:
-    TokenizerString() : m_currentChar(0), m_lines(0), m_composite(false) {}
+    TokenizerString() : m_currentChar(nullptr), m_lines(0), m_composite(false) {}
     TokenizerString(const TQChar *str, int length) : m_currentString(str, length), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
     TokenizerString(const TQString &str) : m_currentString(str), m_currentChar(m_currentString.m_current), m_lines(0), m_composite(false) {}
     TokenizerString(const TokenizerString &o) : m_pushedChar1(o.m_pushedChar1), m_pushedChar2(o.m_pushedChar2),
diff --git a/tdehtml/rendering/bidi.cpp b/tdehtml/rendering/bidi.cpp
index 4c72c477d..13329bb7d 100644
--- a/tdehtml/rendering/bidi.cpp
+++ b/tdehtml/rendering/bidi.cpp
@@ -45,7 +45,7 @@ namespace tdehtml {
 // an iterator which goes through a BidiParagraph
 struct BidiIterator
 {
-    BidiIterator() : par(0), obj(0), pos(0), endOfInline(0) {}
+    BidiIterator() : par(nullptr), obj(nullptr), pos(0), endOfInline(0) {}
     BidiIterator(RenderBlock *_par, RenderObject *_obj, unsigned int _pos, bool eoi=false) : par(_par), obj(_obj), pos(_pos), endOfInline(eoi) {}
 
     void increment( BidiState &bidi, bool skipInlines=true );
@@ -71,7 +71,7 @@ struct BidiStatus {
 };
 
 struct BidiState {
-    BidiState() : context(0) {}
+    BidiState() : context(nullptr) {}
 
     BidiIterator sor;
     BidiIterator eor;
@@ -173,8 +173,8 @@ static void deleteBidiRuns(RenderArena* arena)
         curr = s;
     }
 
-    sFirstBidiRun = 0;
-    sLastBidiRun = 0;
+    sFirstBidiRun = nullptr;
+    sLastBidiRun = nullptr;
     sBidiRunCount = 0;
 }
 
@@ -230,14 +230,14 @@ inline bool operator!=( const BidiIterator &it1, const BidiIterator &it2 )
 
 // when modifying this function, make sure you check InlineMinMaxIterator::next() as well.
 static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, BidiState &bidi,
-                                     bool skipInlines = true, bool *endOfInline = 0 )
+                                     bool skipInlines = true, bool *endOfInline = nullptr )
 {
-    RenderObject *next = 0;
+    RenderObject *next = nullptr;
     bool oldEndOfInline = endOfInline ? *endOfInline : false;
     if (oldEndOfInline)
         *endOfInline = false;
 
-    while(current != 0)
+    while(current)
     {
         //kdDebug( 6040 ) << "current = " << current << endl;
         if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) {
@@ -287,7 +287,7 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
 
 static RenderObject *first( RenderObject *par, BidiState &bidi, bool skipInlines = true )
 {
-    if(!par->firstChild()) return 0;
+    if(!par->firstChild()) return nullptr;
     RenderObject *o = par->firstChild();
 
     if (o->isInlineFlow()) {
@@ -383,7 +383,7 @@ static void reverseRuns(int start, int end)
     // Get the item before the start of the runs to reverse and put it in
     // |beforeStart|.  |curr| should point to the first run to reverse.
     BidiRun* curr = sFirstBidiRun;
-    BidiRun* beforeStart = 0;
+    BidiRun* beforeStart = nullptr;
     int i = 0;
     while (i < start) {
         i++;
@@ -654,9 +654,9 @@ InlineFlowBox* RenderBlock::createLineBoxes(RenderObject* obj)
 InlineFlowBox* RenderBlock::constructLine(const BidiIterator &/*start*/, const BidiIterator &end)
 {
     if (!sFirstBidiRun)
-        return 0; // We had no runs. Don't make a root inline box at all. The line is empty.
+        return nullptr; // We had no runs. Don't make a root inline box at all. The line is empty.
 
-    InlineFlowBox* parentBox = 0;
+    InlineFlowBox* parentBox = nullptr;
     for (BidiRun* r = sFirstBidiRun; r; r = r->nextRun) {
         // Create a box for our object.
         r->box = r->obj->createInlineBox(r->obj->isPositioned(), false);
@@ -680,7 +680,7 @@ InlineFlowBox* RenderBlock::constructLine(const BidiIterator &/*start*/, const B
     // paint borders/margins/padding.  This knowledge will ultimately be used when
     // we determine the horizontal positions and widths of all the inline boxes on
     // the line.
-    RenderObject* endObject = 0;
+    RenderObject* endObject = nullptr;
     bool lastLine = !end.obj;
     if (end.obj && end.pos == 0)
         endObject = end.obj;
@@ -697,7 +697,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi
 {
     // First determine our total width.
     int totWidth = lineBox->getFlowSpacingWidth();
-    BidiRun* r = 0;
+    BidiRun* r = nullptr;
     for (r = sFirstBidiRun; r; r = r->nextRun) {
         if (r->obj->isPositioned())
             continue; // Positioned objects are only participating to figure out their
@@ -911,8 +911,8 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
     kdDebug(6041) << "reordering Line from " << start.obj << "/" << start.pos << " to " << end.obj << "/" << end.pos << endl;
 #endif
 
-    sFirstBidiRun = 0;
-    sLastBidiRun = 0;
+    sFirstBidiRun = nullptr;
+    sLastBidiRun = nullptr;
     sBidiRunCount = 0;
 
     //    context->ref();
@@ -1419,7 +1419,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
 
         sNumMidpoints = 0;
         sCurrMidpoint = 0;
-        sCompactFirstBidiRun = sCompactLastBidiRun = 0;
+        sCompactFirstBidiRun = sCompactLastBidiRun = nullptr;
         sCompactBidiRunCount = 0;
 
         previousLineBrokeAtBR = true;
@@ -1496,7 +1496,7 @@ redo_linebreak:
 
             sNumMidpoints = 0;
             sCurrMidpoint = 0;
-            sCompactFirstBidiRun = sCompactLastBidiRun = 0;
+            sCompactFirstBidiRun = sCompactLastBidiRun = nullptr;
             sCompactBidiRunCount = 0;
         }
         startEmbed->deref();
@@ -1578,7 +1578,7 @@ redo_linebreak:
     //kdDebug(6040) << "height = " << m_height <<endl;
 }
 
-static void setStaticPosition( RenderBlock* p, RenderObject *o, bool *needToSetStaticX = 0, bool *needToSetStaticY = 0 )
+static void setStaticPosition( RenderBlock* p, RenderObject *o, bool *needToSetStaticX = nullptr, bool *needToSetStaticY = nullptr )
 {
       // If our original display wasn't an inline type, then we can
       // determine our static x position now.
@@ -1644,11 +1644,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                     hadPosStart = true;
                     posStart = start;
                     // end
-                    addMidpoint(BidiIterator(0, o, 0));
+                    addMidpoint(BidiIterator(nullptr, o, 0));
                 } else {
                     // start/end
-                    addMidpoint(BidiIterator(0, o, 0));
-                    addMidpoint(BidiIterator(0, o, 0));
+                    addMidpoint(BidiIterator(nullptr, o, 0));
+                    addMidpoint(BidiIterator(nullptr, o, 0));
                 }
                 setStaticPosition(this, o);
             }
@@ -1684,7 +1684,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
     // this to detect when we encounter a second space so we know we have to terminate
     // a run.
     bool currentCharacterIsSpace = false;
-    RenderObject* trailingSpaceObject = 0;
+    RenderObject* trailingSpaceObject = nullptr;
 
     BidiIterator lBreak = start;
 
@@ -1713,7 +1713,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                 // empty or not.
                 if (prevLineBrokeCleanly)
                     isLineEmpty = false;
-                trailingSpaceObject = 0;
+                trailingSpaceObject = nullptr;
                 previousLineBrokeAtBR = true;
 
                 if (!isLineEmpty) {
@@ -1745,7 +1745,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                 // If we're ignoring spaces, we have to stop and include this object and
                 // then start ignoring spaces again.
                 if (needToSetStaticX || needToSetStaticY) {
-                    trailingSpaceObject = 0;
+                    trailingSpaceObject = nullptr;
                     ignoreStart.obj = o;
                     ignoreStart.pos = 0;
                     if (ignoringSpaces) {
@@ -1792,13 +1792,13 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
 
             tmpW += o->width()+o->marginLeft()+o->marginRight();
             if (ignoringSpaces) {
-                BidiIterator startMid( 0, o, 0 );
+                BidiIterator startMid( nullptr, o, 0 );
                 addMidpoint(startMid);
             }
             isLineEmpty = false;
             ignoringSpaces = false;
             currentCharacterIsSpace = false;
-            trailingSpaceObject = 0;
+            trailingSpaceObject = nullptr;
 
             if (o->isListMarker() && o->style()->listStylePosition() == OUTSIDE) {
                 checkShouldIgnoreInitialWhitespace = true;
@@ -1838,7 +1838,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                     nextIsSoftBreakable = true;
                     if (!ignoringSpaces) {
                         // Ignore soft hyphens
-                        BidiIterator endMid(0, o, pos-1);
+                        BidiIterator endMid(nullptr, o, pos-1);
                         addMidpoint(endMid);
 
                         // Add the width up to but not including the hyphen.
@@ -1849,7 +1849,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                         if (o->style()->autoWrap())
                             tmpW += t->width(pos, 1, f);
 
-                        BidiIterator startMid(0, o, pos+1);
+                        BidiIterator startMid(nullptr, o, pos+1);
                         addMidpoint(startMid);
                     }
 
@@ -1869,7 +1869,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                         // new point.
                         ignoringSpaces = false;
                         lastSpace = pos; // e.g., "Foo    goo", don't add in any of the ignored spaces.
-                        BidiIterator startMid ( 0, o, pos );
+                        BidiIterator startMid ( nullptr, o, pos );
                         addMidpoint(startMid);
                     }
                     else {
@@ -1974,7 +1974,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                 if (!preserveWS && currentCharacterIsSpace && !ignoringSpaces)
                     trailingSpaceObject = o;
                 else if (preserveWS || !currentCharacterIsSpace)
-                    trailingSpaceObject = 0;
+                    trailingSpaceObject = nullptr;
 
                 pos++;
                 len--;
@@ -2016,7 +2016,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
                 if (rt->stringLength() > 0 && (rt->text()[0].category() == TQChar::Separator_Space || rt->text()[0] == '\n')) {
                     currentCharacterIsSpace = true;
                     ignoringSpaces = true;
-                    BidiIterator endMid( 0, lastIt.current, 0 );
+                    BidiIterator endMid( nullptr, lastIt.current, 0 );
                     addMidpoint(endMid);
                 }
             }
@@ -2061,7 +2061,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
             //kdDebug() << "start=" << start.obj << " current=" << o << endl;
             // if we have floats, try to get below them.
             if (currentCharacterIsSpace && !ignoringSpaces && !lastIt.current->style()->preserveWS())
-                trailingSpaceObject = 0;
+                trailingSpaceObject = nullptr;
 
             int fb = nearestFloatBottom(m_height);
             int newLineWidth = lineWidth(fb);
@@ -2113,7 +2113,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
     kdDebug( 6041 ) << "end of par, width = " << width << " linewidth = " << w + tmpW << endl;
 #endif
     if( w + tmpW <= width || (lastIt.current && !lastIt.current->style()->autoWrap())) {
-        lBreak.obj = 0;
+        lBreak.obj = nullptr;
         lBreak.pos = 0;
         lBreak.endOfInline = false;
     }
@@ -2177,11 +2177,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
         }
         //else if (lBreak.pos > 0)
         //    lBreak.pos--;
-        else if (lBreak.obj == 0 && trailingSpaceObject->isText()) {
+        else if (!lBreak.obj && trailingSpaceObject->isText()) {
             // Add a new end midpoint that stops right at the very end.
             RenderText* text = static_cast<RenderText *>(trailingSpaceObject);
             unsigned pos = text->length() >=2 ? text->length() - 2 : UINT_MAX;
-            BidiIterator endMid ( 0, trailingSpaceObject, pos );
+            BidiIterator endMid ( nullptr, trailingSpaceObject, pos );
             addMidpoint(endMid);
         }
     }
diff --git a/tdehtml/rendering/bidi.h b/tdehtml/rendering/bidi.h
index ec926d99a..c6d4fd771 100644
--- a/tdehtml/rendering/bidi.h
+++ b/tdehtml/rendering/bidi.h
@@ -34,7 +34,7 @@ namespace tdehtml {
 
     class BidiContext {
     public:
-	BidiContext(unsigned char level, TQChar::Direction embedding, BidiContext *parent = 0, bool override = false);
+	BidiContext(unsigned char level, TQChar::Direction embedding, BidiContext *parent = nullptr, bool override = false);
 	~BidiContext();
 
 	void ref() const;
@@ -54,7 +54,7 @@ namespace tdehtml {
 
     struct BidiRun {
 	BidiRun(int _start, int _stop, RenderObject *_obj, BidiContext *context, TQChar::Direction dir)
-	    :  start( _start ), stop( _stop ), obj( _obj ), box(0), nextRun(0)
+	    :  start( _start ), stop( _stop ), obj( _obj ), box(nullptr), nextRun(nullptr)
 	{
 	    if(dir == TQChar::DirON) dir = context->dir;
 
@@ -123,10 +123,10 @@ public:
 
     inline RenderObject* InlineMinMaxIterator::next()
     {
-        RenderObject* result = 0;
+        RenderObject* result = nullptr;
         bool oldEndOfInline = endOfInline;
         endOfInline = false;
-        while (current != 0 || (current == parent))
+        while (current || (current == parent))
         {
             //kDebug( 6040 ) << "current = " << current;
             if (!oldEndOfInline &&
@@ -159,7 +159,7 @@ public:
                 break;
 
             current = result;
-            result = 0;
+            result = nullptr;
         }
 
         // Update our position.
diff --git a/tdehtml/rendering/break_lines.cpp b/tdehtml/rendering/break_lines.cpp
index e82787eb8..1f3d104e3 100644
--- a/tdehtml/rendering/break_lines.cpp
+++ b/tdehtml/rendering/break_lines.cpp
@@ -25,13 +25,13 @@ namespace tdehtml {
     struct ThaiCache
     {
         ThaiCache() {
-            string = 0;
+            string = nullptr;
             allocated = 0x400;
             wbrpos = (int *) malloc(allocated*sizeof(int));
             numwbrpos = 0;
             numisbreakable = 0x400;
             isbreakable = (int *) malloc(numisbreakable*sizeof(int));
-	    library = 0;
+	    library = nullptr;
         }
         ~ThaiCache() {
             free(wbrpos);
@@ -45,14 +45,14 @@ namespace tdehtml {
         int numwbrpos,numisbreakable;
         KLibrary *library;
     };
-    static ThaiCache *cache = 0;
+    static ThaiCache *cache = nullptr;
 
     void cleanup_thaibreaks()
     {
         delete cache;
-        cache = 0;
+        cache = nullptr;
 #ifndef HAVE_LIBTHAI
-        th_brk = 0;
+        th_brk = nullptr;
 #endif
     }
 
@@ -63,7 +63,7 @@ namespace tdehtml {
 
 #ifndef HAVE_LIBTHAI
 	
-	KLibrary *lib = 0;
+	KLibrary *lib = nullptr;
 
         /* load libthai dynamically */
 	if (( !th_brk ) && thaiCodec  ) {
@@ -75,7 +75,7 @@ namespace tdehtml {
             } else {
                 // indication that loading failed and we shouldn't try to load again
 		printf("Error, can't load libthai...\n");
-                thaiCodec = 0;
+                thaiCodec = nullptr;
                 if (lib)
                     lib->unload();
             }
diff --git a/tdehtml/rendering/counter_tree.cpp b/tdehtml/rendering/counter_tree.cpp
index 931c54332..6f67c8c0a 100644
--- a/tdehtml/rendering/counter_tree.cpp
+++ b/tdehtml/rendering/counter_tree.cpp
@@ -27,7 +27,7 @@ namespace tdehtml {
 
 CounterNode::CounterNode(RenderObject *o)
     : m_hasCounters(false), m_isVisual(false),
-      m_value(0), m_count(0), m_parent(0), m_previous(0), m_next(0),
+      m_value(0), m_count(0), m_parent(nullptr), m_previous(nullptr), m_next(nullptr),
       m_renderer(o) {}
 
 CounterNode::~CounterNode()
@@ -91,7 +91,7 @@ void CounterNode::setParentDirty ()
         m_renderer->setNeedsLayoutAndMinMaxRecalc();
 }
 
-CounterReset::CounterReset(RenderObject *o) : CounterNode(o), m_total(0), m_first(0), m_last(0) {}
+CounterReset::CounterReset(RenderObject *o) : CounterNode(o), m_total(0), m_first(nullptr), m_last(nullptr) {}
 CounterReset::~CounterReset() {}
 
 void CounterReset::insertAfter ( CounterNode *newChild, CounterNode *refChild )
@@ -175,9 +175,9 @@ void CounterReset::removeChild ( CounterNode *oldChild )
     }
 
 
-    oldChild->m_next = 0;
-    oldChild->m_previous = 0;
-    oldChild->m_parent = 0;
+    oldChild->m_next = nullptr;
+    oldChild->m_previous = nullptr;
+    oldChild->m_parent = nullptr;
 }
 
 void CounterReset::recount (bool first)
diff --git a/tdehtml/rendering/counter_tree.h b/tdehtml/rendering/counter_tree.h
index 0266dcc75..7aa29d97d 100644
--- a/tdehtml/rendering/counter_tree.h
+++ b/tdehtml/rendering/counter_tree.h
@@ -44,8 +44,8 @@ public:
     CounterReset* parent() const { return m_parent; }
     CounterNode* previousSibling() const { return m_previous; }
     CounterNode* nextSibling() const { return m_next; }
-    virtual CounterNode* firstChild() const { return 0; } ;
-    virtual CounterNode* lastChild() const { return 0; };
+    virtual CounterNode* firstChild() const { return nullptr; } ;
+    virtual CounterNode* lastChild() const { return nullptr; };
     virtual void insertAfter ( CounterNode *newChild, CounterNode *refChild );
     virtual void removeChild ( CounterNode *oldChild );
     // Convenient self-refering version of the above
diff --git a/tdehtml/rendering/font.cpp b/tdehtml/rendering/font.cpp
index c70073940..36b059f31 100644
--- a/tdehtml/rendering/font.cpp
+++ b/tdehtml/rendering/font.cpp
@@ -472,7 +472,7 @@ void Font::update( TQPaintDeviceMetrics* devMetrics ) const
 
     // small caps
     delete scFont;
-    scFont = 0;
+    scFont = nullptr;
 
     if ( fontDef.smallCaps ) {
 	scFont = new TQFont( f );
diff --git a/tdehtml/rendering/font.h b/tdehtml/rendering/font.h
index e34f54207..2e4391bdf 100644
--- a/tdehtml/rendering/font.h
+++ b/tdehtml/rendering/font.h
@@ -65,9 +65,9 @@ class Font
     friend class CSSStyleSelector;
 
 public:
-    Font() : fontDef(), f(), fm( f ), scFont( 0 ), letterSpacing( 0 ), wordSpacing( 0 ) {}
+    Font() : fontDef(), f(), fm( f ), scFont( nullptr ), letterSpacing( 0 ), wordSpacing( 0 ) {}
     Font( const FontDef &fd )
-        :  fontDef( fd ), f(), fm( f ), scFont( 0 ), letterSpacing( 0 ), wordSpacing( 0 )
+        :  fontDef( fd ), f(), fm( f ), scFont( nullptr ), letterSpacing( 0 ), wordSpacing( 0 )
         {}
     Font(const Font& o)
         : fontDef(o.fontDef), f(o.f), fm(o.fm), scFont(o.scFont), letterSpacing(o.letterSpacing), wordSpacing(o.wordSpacing) { if (o.scFont) scFont = new TQFont(*o.scFont); }
diff --git a/tdehtml/rendering/render_applet.cpp b/tdehtml/rendering/render_applet.cpp
index 6f60c90e6..d9ce5ddc0 100644
--- a/tdehtml/rendering/render_applet.cpp
+++ b/tdehtml/rendering/render_applet.cpp
@@ -47,7 +47,7 @@ RenderApplet::RenderApplet(HTMLElementImpl *applet, const TQMap<TQString, TQStri
     // init RenderObject attributes
     setInline(true);
 
-    KJavaAppletContext *context = 0;
+    KJavaAppletContext *context = nullptr;
     TDEHTMLView *_view = applet->getDocument()->view();
     if ( _view ) {
         TDEHTMLPart *part = _view->part();
diff --git a/tdehtml/rendering/render_arena.cpp b/tdehtml/rendering/render_arena.cpp
index cd879599b..1c8920d29 100644
--- a/tdehtml/rendering/render_arena.cpp
+++ b/tdehtml/rendering/render_arena.cpp
@@ -86,7 +86,7 @@ void* RenderArena::allocate(size_t size)
     header->size = size;
     return header + 1;
 #else
-    void* result = 0;
+    void* result = nullptr;
 
     // Ensure we have correct alignment for pointers
     size = TDEHTML_ROUNDUP(size, sizeof(void*));
diff --git a/tdehtml/rendering/render_block.cpp b/tdehtml/rendering/render_block.cpp
index 414947e1e..637b145a8 100644
--- a/tdehtml/rendering/render_block.cpp
+++ b/tdehtml/rendering/render_block.cpp
@@ -90,8 +90,8 @@ RenderBlock::RenderBlock(DOM::NodeImpl* node)
     : RenderFlow(node)
 {
     m_childrenInline = true;
-    m_floatingObjects = 0;
-    m_positionedObjects = 0;
+    m_floatingObjects = nullptr;
+    m_positionedObjects = nullptr;
     m_firstLine = false;
     m_avoidPageBreak = false;
     m_clearStatus = CNONE;
@@ -116,7 +116,7 @@ void RenderBlock::setStyle(RenderStyle* _style)
     // ### we could save this call when the change only affected
     // non inherited properties
     RenderObject *child = firstChild();
-    while (child != 0)
+    while (child)
     {
         if (child->isAnonymousBlock())
         {
@@ -184,7 +184,7 @@ void RenderBlock::updateFirstLetter()
         firstText = firstText->firstChild();
 
     if (firstText && firstText->isText() && !firstText->isBR()) {
-        RenderObject* firstLetterObject = 0;
+        RenderObject* firstLetterObject = nullptr;
         // Find the old first-letter
         if (firstText->parent()->style()->styleType() == RenderStyle::FIRST_LETTER)
             firstLetterObject = firstText->parent();
@@ -193,7 +193,7 @@ void RenderBlock::updateFirstLetter()
         pseudoStyle->setDisplay( pseudoStyle->isFloating() ? BLOCK : INLINE);
         pseudoStyle->setPosition( STATIC ); // CSS2 says first-letter can't be positioned.
 
-        if (firstLetterObject != 0) {
+        if (firstLetterObject) {
             firstLetterObject->setStyle( pseudoStyle );
             RenderStyle* newStyle = new RenderStyle();
             newStyle->inheritFrom( pseudoStyle );
@@ -456,9 +456,9 @@ void RenderBlock::makePageBreakAvoidBlocks()
     TDEHTMLAssert(canvas()->pagedMode());
 
     RenderObject *breakAfter = firstChild();
-    RenderObject *breakBefore = breakAfter ? breakAfter->nextSibling() : 0;
+    RenderObject *breakBefore = breakAfter ? breakAfter->nextSibling() : nullptr;
 
-    RenderBlock* pageRun = 0;
+    RenderBlock* pageRun = nullptr;
 
     // ### Should follow margin-collapsing rules, skipping self-collapsing blocks
     // and exporting page-breaks from first/last child when collapsing with parent margin.
@@ -483,11 +483,11 @@ void RenderBlock::makePageBreakAvoidBlocks()
                 pageRun->appendChildNode(removeChildNode(breakAfter));
                 pageRun->close();
                 insertChildNode(pageRun, breakBefore);
-                pageRun = 0;
+                pageRun = nullptr;
             }
         }
         breakAfter = breakBefore;
-        breakBefore = breakBefore ? breakBefore->nextSibling() : 0;
+        breakBefore = breakBefore ? breakBefore->nextSibling() : nullptr;
     }
 
     // recurse into positioned block children as well.
@@ -860,7 +860,7 @@ RenderObject* RenderBlock::handlePositionedChild(RenderObject* child, const Marg
         adjustPositionedBlock(child, marginInfo);
         return child->nextSibling();
     }
-    return 0;
+    return nullptr;
 }
 
 RenderObject* RenderBlock::handleFloatingChild(RenderObject* child, const MarginInfo& marginInfo, bool& handled)
@@ -871,7 +871,7 @@ RenderObject* RenderBlock::handleFloatingChild(RenderObject* child, const Margin
         adjustFloatingBlock(marginInfo);
         return child->nextSibling();
     }
-    return 0;
+    return nullptr;
 }
 
 static inline bool isAnonymousWhitespace( RenderObject* o ) {
@@ -918,7 +918,7 @@ RenderObject* RenderBlock::handleCompactChild(RenderObject* child, CompactInfo&
             }
         }
     }
-    return 0;
+    return nullptr;
 }
 
 void RenderBlock::adjustSizeForCompactIfNeeded(RenderObject* child, CompactInfo& compactInfo)
@@ -998,7 +998,7 @@ RenderObject* RenderBlock::handleRunInChild(RenderObject* child, bool& handled)
             return next;
         }
     }
-    return 0;
+    return nullptr;
 }
 
 void RenderBlock::collapseMargins(RenderObject* child, MarginInfo& marginInfo, int yPosEstimate)
@@ -1367,7 +1367,7 @@ void RenderBlock::layoutBlockChildren( bool relayoutChildren )
     PageBreakInfo pageBreakInfo(pageTopAfter(0));
 
     RenderObject* child = firstChild();
-    while( child != 0 )
+    while( child )
     {
         if (legend == child) {
             child = child->nextSibling();
@@ -1750,7 +1750,7 @@ void RenderBlock::removePositionedObject(RenderObject *o)
         }
         if (m_positionedObjects->isEmpty()) {
             delete m_positionedObjects;
-            m_positionedObjects = 0;
+            m_positionedObjects = nullptr;
         }
     }
 }
@@ -1792,7 +1792,7 @@ void RenderBlock::insertFloatingObject(RenderObject *o)
         // We should never get here, as insertFloatingObject() should only ever be called with floating
         // objects.
         TDEHTMLAssert(false);
-        newObj = 0; // keep gcc's uninitialized variable warnings happy
+        newObj = nullptr; // keep gcc's uninitialized variable warnings happy
     }
 
     newObj->node = o;
@@ -2401,7 +2401,7 @@ void RenderBlock::addOverHangingFloats( RenderBlock *flow, int xoff, int offset,
                 }
             }
 
-            FloatingObject* f = 0;
+            FloatingObject* f = nullptr;
             // don't insert it twice!
             if (m_floatingObjects) {
                 TQPtrListIterator<FloatingObject> it(*m_floatingObjects);
@@ -2689,14 +2689,14 @@ void RenderBlock::calcInlineMinMaxWidth()
 
     bool isTcQuirk = isTableCell() && style()->htmlHacks() && style()->width().isVariable();
 
-    RenderObject* trailingSpaceChild = 0;
+    RenderObject* trailingSpaceChild = nullptr;
 
     bool autoWrap, oldAutoWrap;
     autoWrap = oldAutoWrap = style()->autoWrap();
 
     InlineMinMaxIterator childIterator(this, this);
     bool addedTextIndent = false; // Only gets added in once.
-    RenderObject* prevFloat = 0;
+    RenderObject* prevFloat = nullptr;
     while (RenderObject* child = childIterator.next())
     {
         autoWrap = child->style()->autoWrap();
@@ -2824,7 +2824,7 @@ void RenderBlock::calcInlineMinMaxWidth()
                 // a line.
                 if (!child->isFloating()) {
                     stripFrontSpaces = false;
-                   trailingSpaceChild = 0;
+                   trailingSpaceChild = nullptr;
                 }
             }
             else if (child->isText())
@@ -2852,7 +2852,7 @@ void RenderBlock::calcInlineMinMaxWidth()
                 if (stripFrontSpaces)
                     trailingSpaceChild = child;
                 else
-                    trailingSpaceChild = 0;
+                    trailingSpaceChild = nullptr;
 
                 // Add in text-indent.  This is added in only once.
                 int ti = 0;
@@ -2912,7 +2912,7 @@ void RenderBlock::calcInlineMinMaxWidth()
             if(m_maxWidth < inlineMax) m_maxWidth = inlineMax;
             inlineMin = inlineMax = 0;
             stripFrontSpaces = true;
-            trailingSpaceChild = 0;
+            trailingSpaceChild = nullptr;
         }
 
         oldAutoWrap = autoWrap;
@@ -2934,11 +2934,11 @@ void RenderBlock::calcBlockMinMaxWidth()
     bool nowrap = !style()->autoWrap();
 
     RenderObject *child = firstChild();
-    RenderObject* prevFloat = 0;
+    RenderObject* prevFloat = nullptr;
     int floatWidths = 0;
     int floatMaxWidth = 0;
 
-    while(child != 0)
+    while(child)
     {
         // positioned children don't affect the minmaxwidth
         if (child->isPositioned()) {
@@ -3062,7 +3062,7 @@ InlineFlowBox* RenderBlock::getFirstLineBox()
         return m_firstLineBox;
 
     if (isInline())
-        return 0; // We're inline and had no line box, so we have no baseline we can return.
+        return nullptr; // We're inline and had no line box, so we have no baseline we can return.
 
     for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
         InlineFlowBox* result = curr->getFirstLineBox();
@@ -3070,7 +3070,7 @@ InlineFlowBox* RenderBlock::getFirstLineBox()
             return result;
     }
 
-    return 0;
+    return nullptr;
 }
 
 bool RenderBlock::inRootBlockContext() const
diff --git a/tdehtml/rendering/render_block.h b/tdehtml/rendering/render_block.h
index 36d3f6cc4..589af7b9f 100644
--- a/tdehtml/rendering/render_block.h
+++ b/tdehtml/rendering/render_block.h
@@ -47,7 +47,7 @@ public:
 
     virtual bool childrenInline() const { return m_childrenInline; }
     virtual void setChildrenInline(bool b) { m_childrenInline = b; }
-    void makeChildrenNonInline(RenderObject* insertionPoint = 0);
+    void makeChildrenNonInline(RenderObject* insertionPoint = nullptr);
 
     void makePageBreakAvoidBlocks();
 
@@ -108,7 +108,7 @@ public:
     void removePositionedObject(RenderObject *o);
 
     // Called to lay out the legend for a fieldset.
-    virtual RenderObject* layoutLegend(bool /*relayoutChildren*/) { return 0; };
+    virtual RenderObject* layoutLegend(bool /*relayoutChildren*/) { return nullptr; };
 
     // the implementation of the following functions is in bidi.cpp
     void bidiReorderLine(const BidiIterator &start, const BidiIterator &end, BidiState &bidi );
@@ -134,12 +134,12 @@ public:
     void positionNewFloats();
     void clearFloats();
     int getClearDelta(RenderObject *child);
-    virtual void markAllDescendantsWithFloatsForLayout(RenderObject* floatToRemove = 0);
+    virtual void markAllDescendantsWithFloatsForLayout(RenderObject* floatToRemove = nullptr);
 
     // FIXME: containsFloats() should not return true if the floating objects list
     // is empty. However, layoutInlineChildren() relies on the current behavior.
     // http://bugzilla.opendarwin.org/show_bug.cgi?id=7395#c3
-    virtual bool hasFloats() const { return m_floatingObjects!=0; }
+    virtual bool hasFloats() const { return m_floatingObjects!=nullptr; }
     virtual bool containsFloat(RenderObject* o) const;
 
     virtual bool hasOverhangingFloats() const { return floatBottom() > m_height; }
@@ -150,7 +150,7 @@ public:
     inline int leftBottom();
     inline int rightBottom();
 
-    virtual unsigned short lineWidth(int y, bool *canClearLine = 0) const;
+    virtual unsigned short lineWidth(int y, bool *canClearLine = nullptr) const;
     virtual int lowestPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
     virtual int rightmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
     virtual int leftmostPosition(bool includeOverflowInterior=true, bool includeSelf=true) const;
@@ -161,12 +161,12 @@ public:
     int highestAbsolutePosition() const;
 
     int rightOffset() const;
-    int rightRelOffset(int y, int fixedOffset, bool applyTextIndent=true, int *heightRemaining = 0, bool *canClearLine = 0) const;
-    int rightOffset(int y, bool *canClearLine = 0) const { return rightRelOffset(y, rightOffset(), true, 0, canClearLine); }
+    int rightRelOffset(int y, int fixedOffset, bool applyTextIndent=true, int *heightRemaining = nullptr, bool *canClearLine = nullptr) const;
+    int rightOffset(int y, bool *canClearLine = nullptr) const { return rightRelOffset(y, rightOffset(), true, nullptr, canClearLine); }
 
     int leftOffset() const;
-    int leftRelOffset(int y, int fixedOffset, bool applyTextIndent=true, int *heightRemaining = 0, bool *canClearLine = 0) const;
-    int leftOffset(int y, bool *canClearLine = 0) const { return leftRelOffset(y, leftOffset(), true, 0, canClearLine); }
+    int leftRelOffset(int y, int fixedOffset, bool applyTextIndent=true, int *heightRemaining = nullptr, bool *canClearLine = nullptr) const;
+    int leftOffset(int y, bool *canClearLine = nullptr) const { return leftRelOffset(y, leftOffset(), true, nullptr, canClearLine); }
 
     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int _tx, int _ty, HitTestAction hitTestAction = HitTestAll, bool inside=false);
 
@@ -202,7 +202,7 @@ protected:
         };
 
         FloatingObject(Type _type) {
-            node = 0;
+            node = nullptr;
             startY = 0;
             endY = 0;
             type = _type;
@@ -238,7 +238,7 @@ protected:
         bool treatAsBlock() const { return m_treatAsBlock; }
         bool matches(RenderObject* child) const { return m_compact && m_block == child; }
 
-        void clear() { set(0, 0);  }
+        void clear() { set(nullptr, nullptr);  }
         void set(RenderObject* c, RenderObject* b) { m_compact = c; m_block = b; }
 
         CompactInfo() { clear(); }
diff --git a/tdehtml/rendering/render_body.cpp b/tdehtml/rendering/render_body.cpp
index 820b1b872..e56d1d486 100644
--- a/tdehtml/rendering/render_body.cpp
+++ b/tdehtml/rendering/render_body.cpp
@@ -57,7 +57,7 @@ void RenderBody::paintBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
 {
     //kdDebug( 6040 ) << renderName() << "::paintDecorations()" << endl;
     TQColor bgColor;
-    const BackgroundLayer *bgLayer = 0;
+    const BackgroundLayer *bgLayer = nullptr;
 
     if( parent()->style()->hasBackground() ) {
         // the root element already has a non-transparent background of its own
diff --git a/tdehtml/rendering/render_box.cpp b/tdehtml/rendering/render_box.cpp
index 7dc07090d..1b8bf9181 100644
--- a/tdehtml/rendering/render_box.cpp
+++ b/tdehtml/rendering/render_box.cpp
@@ -69,8 +69,8 @@ RenderBox::RenderBox(DOM::NodeImpl* node)
     m_staticX = 0;
     m_staticY = 0;
 
-    m_placeHolderBox = 0;
-    m_layer = 0;
+    m_placeHolderBox = nullptr;
+    m_layer = nullptr;
 }
 
 RenderBlock* RenderBox::createAnonymousBlock()
@@ -188,7 +188,7 @@ void RenderBox::setStyle(RenderStyle *_style)
     }
     else if (m_layer && !isCanvas()) {
         m_layer->removeOnlyThisLayer();
-        m_layer = 0;
+        m_layer = nullptr;
     }
 
     if (m_layer)
@@ -227,7 +227,7 @@ void RenderBox::deleteInlineBoxes(RenderArena* arena)
 {
     if (m_placeHolderBox) {
         m_placeHolderBox->detach( arena ? arena : renderArena() );
-        m_placeHolderBox = 0;
+        m_placeHolderBox = nullptr;
     }
 }
 
@@ -337,7 +337,7 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int _tx, int _ty)
         // anonymous blocks created by inline <body> tags etc.  We can locate the <body>
         // render object very easily via the DOM.
         HTMLElementImpl* body = document()->body();
-        RenderObject* bodyObject = (body && body->id() == ID_BODY) ? body->renderer() : 0;
+        RenderObject* bodyObject = (body && body->id() == ID_BODY) ? body->renderer() : nullptr;
 
         if (bodyObject) {
             bgLayer = bodyObject->style()->backgroundLayers();
diff --git a/tdehtml/rendering/render_box.h b/tdehtml/rendering/render_box.h
index 0a65df72e..b3ebc6a7a 100644
--- a/tdehtml/rendering/render_box.h
+++ b/tdehtml/rendering/render_box.h
@@ -53,7 +53,7 @@ public:
     virtual void close();
 
     virtual InlineBox* createInlineBox(bool makePlaceHolderBox, bool isRootLineBox);
-    virtual void deleteInlineBoxes(RenderArena* arena=0);
+    virtual void deleteInlineBoxes(RenderArena* arena=nullptr);
 
     virtual void detach();
 
diff --git a/tdehtml/rendering/render_canvas.cpp b/tdehtml/rendering/render_canvas.cpp
index ab634d760..da9e1aa37 100644
--- a/tdehtml/rendering/render_canvas.cpp
+++ b/tdehtml/rendering/render_canvas.cpp
@@ -65,12 +65,12 @@ RenderCanvas::RenderCanvas(DOM::NodeImpl* node, TDEHTMLView *view)
     m_pageTop = 0;
     m_pageBottom = 0;
 
-    m_page = 0;
+    m_page = nullptr;
 
     m_maximalOutlineSize = 0;
 
-    m_selectionStart = 0;
-    m_selectionEnd = 0;
+    m_selectionStart = nullptr;
+    m_selectionEnd = nullptr;
     m_selectionStartPos = -1;
     m_selectionEndPos = -1;
 
@@ -675,12 +675,12 @@ void RenderCanvas::clearSelection(bool doRepaint)
     // set selection start & end to 0
     if (m_selectionStart)
         m_selectionStart->setIsSelectionBorder(false);
-    m_selectionStart = 0;
+    m_selectionStart = nullptr;
     m_selectionStartPos = -1;
 
     if (m_selectionEnd)
         m_selectionEnd->setIsSelectionBorder(false);
-    m_selectionEnd = 0;
+    m_selectionEnd = nullptr;
     m_selectionEndPos = -1;
 }
 
diff --git a/tdehtml/rendering/render_container.cpp b/tdehtml/rendering/render_container.cpp
index bf0cd37ec..0f7d7d848 100644
--- a/tdehtml/rendering/render_container.cpp
+++ b/tdehtml/rendering/render_container.cpp
@@ -43,8 +43,8 @@ using namespace tdehtml;
 RenderContainer::RenderContainer(DOM::NodeImpl* node)
     : RenderObject(node)
 {
-    m_first = 0;
-    m_last = 0;
+    m_first = nullptr;
+    m_last = nullptr;
 }
 
 void RenderContainer::detach()
@@ -63,12 +63,12 @@ void RenderContainer::detach()
 
     RenderObject* next;
     for(RenderObject* n = m_first; n; n = next ) {
-        n->setParent(0);
+        n->setParent(nullptr);
         next = n->nextSibling();
         n->detach();
     }
-    m_first = 0;
-    m_last = 0;
+    m_first = nullptr;
+    m_last = nullptr;
 
     RenderObject::detach();
 }
@@ -146,7 +146,7 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild
 	    newStyle->setFlowAroundFloats( true );
 	    table->setParent( this ); // so it finds the arena
             table->setStyle(newStyle);
-	    table->setParent( 0 );
+	    table->setParent( nullptr );
             addChild(table, beforeChild);
         }
         table->addChild(newChild);
@@ -212,9 +212,9 @@ RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
     if (m_last == oldChild)
         m_last = oldChild->previousSibling();
 
-    oldChild->setPreviousSibling(0);
-    oldChild->setNextSibling(0);
-    oldChild->setParent(0);
+    oldChild->setPreviousSibling(nullptr);
+    oldChild->setNextSibling(nullptr);
+    oldChild->setParent(nullptr);
 
     return oldChild;
 }
@@ -232,7 +232,7 @@ void RenderContainer::setStyle(RenderStyle* _style)
         pseudoStyle->inheritFrom(style());
         pseudoStyle->ref();
         RenderObject *child = firstChild();
-        while (child != 0)
+        while (child)
         {
             child->setStyle(pseudoStyle);
             child = child->nextSibling();
@@ -293,7 +293,7 @@ void RenderContainer::updatePseudoChild(RenderStyle::PseudoId type)
         // The child needs to be removed.
         oldContentPresent = false;
         child->detach();
-        child = 0;
+        child = nullptr;
     }
 
     // If we have no pseudo-style or if the pseudo's display type is NONE, then we
@@ -303,7 +303,7 @@ void RenderContainer::updatePseudoChild(RenderStyle::PseudoId type)
 
     // Generated content consists of a single container that houses multiple children (specified
     // by the content property).  This pseudo container gets the pseudo style set on it.
-    RenderContainer* pseudoContainer = 0;
+    RenderContainer* pseudoContainer = nullptr;
     pseudoContainer = RenderFlow::createFlow(element(), pseudo, renderArena());
     pseudoContainer->setIsAnonymous( true );
     pseudoContainer->createGeneratedContent();
@@ -329,7 +329,7 @@ void RenderContainer::createGeneratedContent()
     {
         if (contentData->_contentType == CONTENT_TEXT)
         {
-            RenderText* t = new (renderArena()) RenderText( node(), 0);
+            RenderText* t = new (renderArena()) RenderText( node(), nullptr);
             t->setIsAnonymous( true );
             t->setStyle(style);
             t->setText(contentData->contentText());
@@ -347,7 +347,7 @@ void RenderContainer::createGeneratedContent()
         {
             // really a counter or just a glyph?
             EListStyleType type = (EListStyleType)contentData->contentCounter()->listStyle();
-            RenderObject *t = 0;
+            RenderObject *t = nullptr;
             if (isListStyleCounted(type)) {
                 t = new (renderArena()) RenderCounter( node(), contentData->contentCounter() );
             }
@@ -371,7 +371,7 @@ void RenderContainer::createGeneratedContent()
 
 RenderContainer* RenderContainer::pseudoContainer(RenderStyle::PseudoId type) const
 {
-    RenderObject *child = 0;
+    RenderObject *child = nullptr;
     switch (type) {
         case RenderStyle::AFTER:
             child = lastChild();
@@ -385,7 +385,7 @@ RenderContainer* RenderContainer::pseudoContainer(RenderStyle::PseudoId type) co
                 child = child->previousSibling();
             break;
         default:
-            child = 0;
+            child = nullptr;
     }
 
     if (child && child->style()->styleType() == type) {
@@ -399,7 +399,7 @@ RenderContainer* RenderContainer::pseudoContainer(RenderStyle::PseudoId type) co
     }
     if (child && child->isAnonymousBlock())
         return static_cast<RenderBlock*>(child)->pseudoContainer(type);
-    return 0;
+    return nullptr;
 }
 
 void RenderContainer::addPseudoContainer(RenderObject* child)
@@ -412,9 +412,9 @@ void RenderContainer::addPseudoContainer(RenderObject* child)
 
             // Coalesce inlines
             if (child->style()->display() == INLINE && o->lastChild() && o->lastChild()->isAnonymousBlock()) {
-                o->lastChild()->addChild(child, 0);
+                o->lastChild()->addChild(child, nullptr);
             } else
-                o->addChild(child, 0);
+                o->addChild(child, nullptr);
             break;
         }
         case RenderStyle::BEFORE:
@@ -465,7 +465,7 @@ void RenderContainer::updateReplacedContent()
 
 void RenderContainer::appendChildNode(RenderObject* newChild)
 {
-    TDEHTMLAssert(newChild->parent() == 0);
+    TDEHTMLAssert(newChild->parent() == nullptr);
 
     newChild->setParent(this);
     RenderObject* lChild = lastChild();
@@ -578,13 +578,13 @@ void RenderContainer::removeLeftoverAnonymousBoxes()
 		if ( child == lastChild() )
 		    m_last = child->previousSibling();
 	    }
-	    child->setParent( 0 );
-	    child->setPreviousSibling( 0 );
-	    child->setNextSibling( 0 );
+	    child->setParent( nullptr );
+	    child->setPreviousSibling( nullptr );
+	    child->setNextSibling( nullptr );
 	    if ( !child->isText() ) {
 		RenderContainer *c = static_cast<RenderContainer *>(child);
-		c->m_first = 0;
-		c->m_next = 0;
+		c->m_first = nullptr;
+		c->m_next = nullptr;
 	    }
 	    child->detach();
 	}
diff --git a/tdehtml/rendering/render_container.h b/tdehtml/rendering/render_container.h
index 44ff88384..212e256e0 100644
--- a/tdehtml/rendering/render_container.h
+++ b/tdehtml/rendering/render_container.h
@@ -47,7 +47,7 @@ public:
         return true;
     }
 
-    virtual void addChild(RenderObject *newChild, RenderObject *beforeChild = 0);
+    virtual void addChild(RenderObject *newChild, RenderObject *beforeChild = nullptr);
 
     virtual RenderObject* removeChildNode(RenderObject* child);
     virtual void appendChildNode(RenderObject* child);
diff --git a/tdehtml/rendering/render_flow.cpp b/tdehtml/rendering/render_flow.cpp
index 1a1812c75..a7423b6cb 100644
--- a/tdehtml/rendering/render_flow.cpp
+++ b/tdehtml/rendering/render_flow.cpp
@@ -109,7 +109,7 @@ void RenderFlow::addChildWithContinuation(RenderObject* newChild, RenderObject*
         if (childInline == bcpInline)
             return beforeChildParent->addChildToFlow(newChild, beforeChild);
         else if (flowInline == childInline)
-            return flow->addChildToFlow(newChild, 0); // Just treat like an append.
+            return flow->addChildToFlow(newChild, nullptr); // Just treat like an append.
         else
             return beforeChildParent->addChildToFlow(newChild, beforeChild);
     }
@@ -135,14 +135,14 @@ void RenderFlow::deleteInlineBoxes(RenderArena* arena)
     if (m_firstLineBox) {
         if (!arena)
             arena = renderArena();
-        InlineRunBox *curr=m_firstLineBox, *next=0;
+        InlineRunBox *curr=m_firstLineBox, *next=nullptr;
         while (curr) {
             next = curr->nextLineBox();
             curr->detach(arena);
             curr = next;
         }
-        m_firstLineBox = 0;
-        m_lastLineBox = 0;
+        m_firstLineBox = nullptr;
+        m_lastLineBox = nullptr;
     }
 }
 
@@ -153,7 +153,7 @@ void RenderFlow::deleteLastLineBox(RenderArena* arena)
             arena = renderArena();
         InlineRunBox *curr=m_lastLineBox, *prev = m_lastLineBox;
         if (m_firstLineBox == m_lastLineBox)
-            m_firstLineBox = m_lastLineBox = 0;
+            m_firstLineBox = m_lastLineBox = nullptr;
         else {
             prev = curr->prevLineBox();
             while (!prev->isInlineFlowBox()) {
@@ -161,7 +161,7 @@ void RenderFlow::deleteLastLineBox(RenderArena* arena)
                 prev->detach(arena);
             }
             m_lastLineBox = static_cast<InlineFlowBox*>(prev);
-            prev->setNextLineBox(0);
+            prev->setNextLineBox(nullptr);
         }
         if (curr->parent()) {
             curr->parent()->removeFromLine(curr);
@@ -176,7 +176,7 @@ InlineBox* RenderFlow::createInlineBox(bool makePlaceHolderBox, bool isRootLineB
          (isReplaced() || makePlaceHolderBox) )       // Inline tables and inline blocks
          return RenderBox::createInlineBox(false, false);    // (or positioned element placeholders).
 
-    InlineFlowBox* flowBox = 0;
+    InlineFlowBox* flowBox = nullptr;
     if (isInlineFlow())
         flowBox = new (renderArena()) InlineFlowBox(this);
     else
@@ -294,7 +294,7 @@ void RenderFlow::repaint(Priority prior)
              }
         }
 
-        RootInlineBox *lastRoot = lastLineBox() && !needsLayout() ? lastLineBox()->root() : 0;
+        RootInlineBox *lastRoot = lastLineBox() && !needsLayout() ? lastLineBox()->root() : nullptr;
         containingBlock()->repaintRectangle(-ow+left, -ow+top,
                                             width()+ow*2,
 					    (lastRoot ? lastRoot->bottomOverflow() - top : height())+ow*2, prior);
diff --git a/tdehtml/rendering/render_flow.h b/tdehtml/rendering/render_flow.h
index 684968bc1..5be333db0 100644
--- a/tdehtml/rendering/render_flow.h
+++ b/tdehtml/rendering/render_flow.h
@@ -45,7 +45,7 @@ class RenderFlow : public RenderBox
 public:
     RenderFlow(DOM::NodeImpl* node)
       : RenderBox(node)
-    { m_continuation = 0; m_firstLineBox = 0; m_lastLineBox = 0; }
+    { m_continuation = nullptr; m_firstLineBox = nullptr; m_lastLineBox = nullptr; }
 
     virtual RenderFlow* continuation() const { return m_continuation; }
     void setContinuation(RenderFlow* c) { m_continuation = c; }
@@ -53,12 +53,12 @@ public:
 
     void addChildWithContinuation(RenderObject* newChild, RenderObject* beforeChild);
     virtual void addChildToFlow(RenderObject* newChild, RenderObject* beforeChild) = 0;
-    virtual void addChild(RenderObject *newChild, RenderObject *beforeChild = 0);
+    virtual void addChild(RenderObject *newChild, RenderObject *beforeChild = nullptr);
 
     static RenderFlow* createFlow(DOM::NodeImpl* node, RenderStyle* style, RenderArena* arena);
 
-    virtual void deleteLastLineBox(RenderArena* arena=0);
-    virtual void deleteInlineBoxes(RenderArena* arena=0);
+    virtual void deleteLastLineBox(RenderArena* arena=nullptr);
+    virtual void deleteInlineBoxes(RenderArena* arena=nullptr);
 
 
     InlineFlowBox* firstLineBox() const { return m_firstLineBox; }
diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp
index f18ce9ae6..046add4a1 100644
--- a/tdehtml/rendering/render_form.cpp
+++ b/tdehtml/rendering/render_form.cpp
@@ -308,7 +308,7 @@ RenderResetButton::RenderResetButton(HTMLInputElementImpl *element)
 // -------------------------------------------------------------------------------
 
 LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, TDEHTMLView* view, TQWidget* parent)
-    : KLineEdit(parent, "__tdehtml"), m_input(input), m_view(view), m_spell(0)
+    : KLineEdit(parent, "__tdehtml"), m_input(input), m_view(view), m_spell(nullptr)
 {
     setMouseTracking(true);
     TDEActionCollection *ac = new TDEActionCollection(this);
@@ -318,7 +318,7 @@ LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, TDEHTMLView* vi
 LineEditWidget::~LineEditWidget()
 {
     delete m_spell;
-    m_spell = 0L;
+    m_spell = nullptr;
 }
 
 void LineEditWidget::slotCheckSpelling()
@@ -328,7 +328,7 @@ void LineEditWidget::slotCheckSpelling()
     }
 
     delete m_spell;
-    m_spell = new KSpell( this, i18n( "Spell Checking" ), this, TQ_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true);
+    m_spell = new KSpell( this, i18n( "Spell Checking" ), this, TQ_SLOT( slotSpellCheckReady( KSpell *) ), nullptr, true, true);
 
     connect( m_spell, TQ_SIGNAL( death() ),this, TQ_SLOT( spellCheckerFinished() ) );
     connect( m_spell, TQ_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),this, TQ_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) );
@@ -377,7 +377,7 @@ TQPopupMenu *LineEditWidget::createPopupMenu()
     TQPopupMenu *popup = KLineEdit::createPopupMenu();
 
     if ( !popup ) {
-        return 0L;
+        return nullptr;
     }
 
     connect( popup, TQ_SIGNAL( activated( int ) ),
@@ -668,7 +668,7 @@ RenderObject* RenderFieldset::findLegend()
           legend->element()->id() == ID_LEGEND)
         return legend;
     }
-    return 0;
+    return nullptr;
 }
 
 void RenderFieldset::paintBoxDecorations(PaintInfo& pI, int _tx, int _ty)
@@ -1277,7 +1277,7 @@ void RenderSelect::updateSelection()
 // -------------------------------------------------------------------------
 
 TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent)
-    : KTextEdit(parent, "__tdehtml"), m_findDlg(0), m_find(0), m_repDlg(0), m_replace(0)
+    : KTextEdit(parent, "__tdehtml"), m_findDlg(nullptr), m_find(nullptr), m_repDlg(nullptr), m_replace(nullptr)
 {
     if(wrap != DOM::HTMLTextAreaElementImpl::ta_NoWrap) {
         setWordWrap(TQTextEdit::WidgetWidth);
@@ -1304,13 +1304,13 @@ TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent)
 TextAreaWidget::~TextAreaWidget()
 {
     delete m_replace;
-    m_replace = 0L;
+    m_replace = nullptr;
     delete m_find;
-    m_find = 0L;
+    m_find = nullptr;
     delete m_repDlg;
-    m_repDlg = 0L;
+    m_repDlg = nullptr;
     delete m_findDlg;
-    m_findDlg = 0L;
+    m_findDlg = nullptr;
 }
 
 
@@ -1319,7 +1319,7 @@ TQPopupMenu *TextAreaWidget::createPopupMenu(const TQPoint& pos)
     TQPopupMenu *popup = KTextEdit::createPopupMenu(pos);
 
     if ( !popup ) {
-        return 0L;
+        return nullptr;
     }
 
     if (!isReadOnly()) {
@@ -1329,7 +1329,7 @@ TQPopupMenu *TextAreaWidget::createPopupMenu(const TQPoint& pos)
         m_findAction->setEnabled( !text().isEmpty() );
 
         m_findNextAction->plug(popup);
-        m_findNextAction->setEnabled( m_find != 0 );
+        m_findNextAction->setEnabled( m_find != nullptr );
 
         m_replaceAction->plug(popup);
         m_replaceAction->setEnabled( !text().isEmpty() );
@@ -1456,7 +1456,7 @@ void TextAreaWidget::slotReplaceNext()
     if (res == KFind::NoMatch) { // at end
         m_replace->displayFinalDialog();
         delete m_replace;
-        m_replace = 0;
+        m_replace = nullptr;
         ensureCursorVisible();
         //or           if ( m_replace->shouldRestart() ) { reinit (w/o FromCursor) and call slotReplaceNext(); }
     } else {
@@ -1545,7 +1545,7 @@ void TextAreaWidget::slotFindNext()
     if (res == KFind::NoMatch) { // at end
         m_find->displayFinalDialog();
         delete m_find;
-        m_find = 0;
+        m_find = nullptr;
         //or           if ( m_find->shouldRestart() ) { reinit (w/o FromCursor) and call slotFindNext(); }
     } else {
         //m_find->closeFindNextDialog();
diff --git a/tdehtml/rendering/render_frames.cpp b/tdehtml/rendering/render_frames.cpp
index 1035f97a0..3381a72cd 100644
--- a/tdehtml/rendering/render_frames.cpp
+++ b/tdehtml/rendering/render_frames.cpp
@@ -60,8 +60,8 @@ RenderFrameSet::RenderFrameSet( HTMLFrameSetElementImpl *frameSet)
 
   for (int k = 0; k < 2; ++k) {
       m_gridLen[k] = -1;
-      m_gridDelta[k] = 0;
-      m_gridLayout[k] = 0;
+      m_gridDelta[k] = nullptr;
+      m_gridLayout[k] = nullptr;
   }
 
   m_resizing = m_clientresizing= false;
@@ -71,8 +71,8 @@ RenderFrameSet::RenderFrameSet( HTMLFrameSetElementImpl *frameSet)
   m_hSplit = -1;
   m_vSplit = -1;
 
-  m_hSplitVar = 0;
-  m_vSplitVar = 0;
+  m_hSplitVar = nullptr;
+  m_vSplitVar = nullptr;
 }
 
 RenderFrameSet::~RenderFrameSet()
@@ -757,7 +757,7 @@ void RenderPartObject::updateWidget()
       params.append( TQString::fromLatin1("__TDEHTML__PLUGINEMBED=\"YES\"") );
       params.append( TQString::fromLatin1("__TDEHTML__PLUGINBASEURL=\"%1\"").arg(element()->getDocument()->baseURL().url()));
 
-      HTMLEmbedElementImpl *embed = 0;
+      HTMLEmbedElementImpl *embed = nullptr;
       TQString classId;
       TQString serviceType = objbase->serviceType;
       if ( element()->id() == ID_EMBED ) {
@@ -866,7 +866,7 @@ bool RenderPartObject::partLoadingErrorNotify( tdehtml::ChildFrame *childFrame,
 
         // check for embed child object
         HTMLObjectElementImpl *o = static_cast<HTMLObjectElementImpl *>(element());
-        HTMLEmbedElementImpl *embed = 0;
+        HTMLEmbedElementImpl *embed = nullptr;
         NodeImpl *child = o->firstChild();
         while ( child ) {
             if ( child->id() == ID_EMBED )
@@ -901,7 +901,7 @@ bool RenderPartObject::partLoadingErrorNotify( tdehtml::ChildFrame *childFrame,
 void RenderPartObject::slotPartLoadingErrorNotify()
 {
     // First we need to find out the servicetype - again - this code is too duplicated !
-    HTMLEmbedElementImpl *embed = 0;
+    HTMLEmbedElementImpl *embed = nullptr;
     TQString serviceType;
     if( element()->id()==ID_OBJECT ) {
 
diff --git a/tdehtml/rendering/render_generated.cpp b/tdehtml/rendering/render_generated.cpp
index cf945145f..0f64548e7 100644
--- a/tdehtml/rendering/render_generated.cpp
+++ b/tdehtml/rendering/render_generated.cpp
@@ -32,7 +32,7 @@ using namespace Enumerate;
 // -------------------------------------------------------------------------
 
 RenderCounterBase::RenderCounterBase(DOM::NodeImpl* node)
-    : RenderText(node,0), m_counterNode(0)
+    : RenderText(node,nullptr), m_counterNode(nullptr)
 {
 }
 
diff --git a/tdehtml/rendering/render_image.cpp b/tdehtml/rendering/render_image.cpp
index bfe5781ac..27740f9ba 100644
--- a/tdehtml/rendering/render_image.cpp
+++ b/tdehtml/rendering/render_image.cpp
@@ -59,7 +59,7 @@ using namespace tdehtml;
 RenderImage::RenderImage(NodeImpl *_element)
     : RenderReplaced(_element)
 {
-    m_oldImage = m_cachedImage = 0;
+    m_oldImage = m_cachedImage = nullptr;
 
     m_selectionState = SelectionNone;
     berrorPic = false;
@@ -268,7 +268,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
                 qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight,
                                  TDEApplication::palette().inactive(), true, 1 );
             }
-            TQPixmap const* pix = i ? &i->pixmap() : 0;
+            TQPixmap const* pix = i ? &i->pixmap() : nullptr;
             if(berrorPic && pix && (cWidth >= pix->width()+4) && (cHeight >= pix->height()+4) )
             {
                 TQRect r(pix->rect());
@@ -415,7 +415,7 @@ void RenderImage::notifyFinished(CachedObject *finishedObj)
 {
     if ( ( m_cachedImage == finishedObj || m_oldImage == finishedObj ) && m_oldImage ) {
         m_oldImage->deref( this );
-        m_oldImage = 0;
+        m_oldImage = nullptr;
         repaint();
     }
 
@@ -432,7 +432,7 @@ bool RenderImage::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
         if (isRelPositioned())
             relativePositionOffset(tx, ty);
 
-        HTMLImageElementImpl* i = element()->id() == ID_IMG ? static_cast<HTMLImageElementImpl*>(element()) : 0;
+        HTMLImageElementImpl* i = element()->id() == ID_IMG ? static_cast<HTMLImageElementImpl*>(element()) : nullptr;
         HTMLMapElementImpl* map;
         if (i && i->getDocument()->isHTMLDocument() &&
             (map = static_cast<HTMLDocumentImpl*>(i->getDocument())->getMap(i->imageMap()))) {
diff --git a/tdehtml/rendering/render_inline.cpp b/tdehtml/rendering/render_inline.cpp
index 5439a5310..be3c6d5fc 100644
--- a/tdehtml/rendering/render_inline.cpp
+++ b/tdehtml/rendering/render_inline.cpp
@@ -49,7 +49,7 @@ void RenderInline::setStyle(RenderStyle* _style)
     while (currCont) {
         if (currCont->isInline()) {
             RenderFlow* nextCont = currCont->continuation();
-            currCont->setContinuation(0);
+            currCont->setContinuation(nullptr);
             currCont->setStyle(style());
             currCont->setContinuation(nextCont);
         }
@@ -129,7 +129,7 @@ void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock,
     while (o) {
         RenderObject* tmp = o;
         o = tmp->nextSibling();
-        clone->addChildToFlow(removeChildNode(tmp), 0);
+        clone->addChildToFlow(removeChildNode(tmp), nullptr);
         tmp->setNeedsLayoutAndMinMaxRecalc();
     }
 
@@ -147,7 +147,7 @@ void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock,
         clone = cloneInline(curr);
 
         // Insert our child clone as the first child.
-        clone->addChildToFlow(cloneChild, 0);
+        clone->addChildToFlow(cloneChild, nullptr);
 
         // Hook the clone up as a continuation of |curr|.
         RenderFlow* oldCont = curr->continuation();
@@ -185,7 +185,7 @@ void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock,
 void RenderInline::splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox,
                              RenderObject* newChild, RenderFlow* oldCont)
 {
-    RenderBlock* pre = 0;
+    RenderBlock* pre = nullptr;
     RenderBlock* block = containingBlock();
     bool madeNewBeforeBlock = false;
     if (block->isAnonymousBlock()) {
@@ -230,7 +230,7 @@ void RenderInline::splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox
     // adding the newChild until now so that the |newBlockBox| would be fully
     // connected, thus allowing newChild access to a renderArena should it need
     // to wrap itself in additional boxes (e.g., table construction).
-    newBlockBox->addChildToFlow(newChild, 0);
+    newBlockBox->addChildToFlow(newChild, nullptr);
 
     // XXXdwh is any of this even necessary? I don't think it is.
     pre->close();
@@ -492,9 +492,9 @@ inline static bool lineBoxesDisjoint(InlineRunBox *line, int offset, bool toBegi
  */
 static void collectVerticalBoxCoordinates(InlineRunBox *line,
                                           TQValueVector<TQPoint> &pointArray,
-                                          bool left, int offset, InlineRunBox **lastline = 0)
+                                          bool left, int offset, InlineRunBox **lastline = nullptr)
 {
-    InlineRunBox *last = 0;
+    InlineRunBox *last = nullptr;
     offset = left ? -offset:offset;
     for (InlineRunBox* curr = line; curr && !last; curr = left ? curr->prevLineBox() : curr->nextLineBox()) {
         InlineBox *root = curr;
@@ -843,8 +843,8 @@ bool RenderInline::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
             info.setInnerNode(element());
 
             // Clear everything else.
-            info.setInnerNonSharedNode(0);
-            info.setURLElement(0);
+            info.setInnerNonSharedNode(nullptr);
+            info.setURLElement(nullptr);
         }
 
         if (!info.innerNode())
diff --git a/tdehtml/rendering/render_layer.cpp b/tdehtml/rendering/render_layer.cpp
index 1da1e0b82..c9784aca7 100644
--- a/tdehtml/rendering/render_layer.cpp
+++ b/tdehtml/rendering/render_layer.cpp
@@ -66,7 +66,7 @@ using namespace DOM;
 using namespace tdehtml;
 
 #ifdef APPLE_CHANGES
-TQScrollBar* RenderLayer::gScrollBar = 0;
+TQScrollBar* RenderLayer::gScrollBar = nullptr;
 #endif
 
 #ifndef NDEBUG
@@ -81,29 +81,29 @@ RenderScrollMediator::slotValueChanged()
 
 RenderLayer::RenderLayer(RenderObject* object)
 : m_object( object ),
-m_parent( 0 ),
-m_previous( 0 ),
-m_next( 0 ),
-m_first( 0 ),
-m_last( 0 ),
+m_parent( nullptr ),
+m_previous( nullptr ),
+m_next( nullptr ),
+m_first( nullptr ),
+m_last( nullptr ),
 m_x( 0 ),
 m_y( 0 ),
 m_scrollX( 0 ),
 m_scrollY( 0 ),
 m_scrollWidth( 0 ),
 m_scrollHeight( 0 ),
-m_hBar( 0 ),
-m_vBar( 0 ),
-m_scrollMediator( 0 ),
-m_posZOrderList( 0 ),
-m_negZOrderList( 0 ),
-m_overflowList(0),
+m_hBar( nullptr ),
+m_vBar( nullptr ),
+m_scrollMediator( nullptr ),
+m_posZOrderList( nullptr ),
+m_negZOrderList( nullptr ),
+m_overflowList(nullptr),
 m_zOrderListsDirty( true ),
 m_overflowListDirty(true),
 m_isOverflowOnly( shouldBeOverflowOnly() ),
 m_markedForRepaint( false ),
 m_hasOverlaidWidgets( false ),
-m_marquee( 0 )
+m_marquee( nullptr )
 {
 }
 
@@ -413,9 +413,9 @@ RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild)
             stackingContext->dirtyZOrderLists();
     }
 
-    oldChild->setPreviousSibling(0);
-    oldChild->setNextSibling(0);
-    oldChild->setParent(0);
+    oldChild->setPreviousSibling(nullptr);
+    oldChild->setNextSibling(nullptr);
+    oldChild->setParent(nullptr);
 
     return oldChild;
 }
@@ -620,7 +620,7 @@ RenderLayer::showScrollbar(TQt::Orientation o, bool show)
     }
     else if (!show && sb) {
         delete sb;
-        sb = 0;
+        sb = nullptr;
     }
 
     if (o == TQt::Horizontal)
@@ -973,7 +973,7 @@ bool RenderLayer::nodeAtPoint(RenderObject::NodeInfo& info, int x, int y)
 {
 #ifdef APPLE_CHANGES
     // Clear our our scrollbar variable
-    RenderLayer::gScrollBar = 0;
+    RenderLayer::gScrollBar = nullptr;
 #endif
 
     int stx = m_x;
@@ -1019,7 +1019,7 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje
 
     // This variable tracks which layer the mouse ends up being inside.  The minute we find an insideLayer,
     // we are done and can return it.
-    RenderLayer* insideLayer = 0;
+    RenderLayer* insideLayer = nullptr;
 
     // Begin by walking our list of positive layers from highest z-index down to the lowest
     // z-index.
@@ -1073,7 +1073,7 @@ RenderLayer* RenderLayer::nodeAtPointForLayer(RenderLayer* rootLayer, RenderObje
         return this;
 
     // No luck.
-    return 0;
+    return nullptr;
 }
 
 void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, TQRect& overflowClipRect,
@@ -1184,14 +1184,14 @@ static RenderObject* hoverAncestor(RenderObject* obj)
 static RenderObject* commonAncestor(RenderObject* obj1, RenderObject* obj2)
 {
     if (!obj1 || !obj2)
-        return 0;
+        return nullptr;
 
     for (RenderObject* currObj1 = obj1; currObj1; currObj1 = hoverAncestor(currObj1))
         for (RenderObject* currObj2 = obj2; currObj2; currObj2 = hoverAncestor(currObj2))
             if (currObj1 == currObj2)
                 return currObj1;
 
-    return 0;
+    return nullptr;
 }
 
 
@@ -1202,7 +1202,7 @@ void RenderLayer::updateHoverActiveState(RenderObject::NodeInfo& info)
         return;
 
     DOM::NodeImpl *e = m_object->element();
-    DOM::DocumentImpl *doc = e ? e->getDocument() : 0;
+    DOM::DocumentImpl *doc = e ? e->getDocument() : nullptr;
     if (!doc) return;
 
     // Check to see if the hovered node has changed.  If not, then we don't need to
@@ -1218,11 +1218,11 @@ void RenderLayer::updateHoverActiveState(RenderObject::NodeInfo& info)
     if (info.active())
         doc->setActiveNode(newHoverNode);
     else
-        doc->setActiveNode(0);
+        doc->setActiveNode(nullptr);
 
     // We have two different objects.  Fetch their renderers.
-    RenderObject* oldHoverObj = oldHoverNode ? oldHoverNode->renderer() : 0;
-    RenderObject* newHoverObj = newHoverNode ? newHoverNode->renderer() : 0;
+    RenderObject* oldHoverObj = oldHoverNode ? oldHoverNode->renderer() : nullptr;
+    RenderObject* newHoverObj = newHoverNode ? newHoverNode->renderer() : nullptr;
 
     // Locate the common ancestor render object for the two renderers.
     RenderObject* ancestor = commonAncestor(oldHoverObj, newHoverObj);
@@ -1528,7 +1528,7 @@ void RenderLayer::styleChanged()
     }
     else if (m_marquee) {
         delete m_marquee;
-        m_marquee = 0;
+        m_marquee = nullptr;
     }
 }
 
diff --git a/tdehtml/rendering/render_layer.h b/tdehtml/rendering/render_layer.h
index 2854f2c87..5d614b74f 100644
--- a/tdehtml/rendering/render_layer.h
+++ b/tdehtml/rendering/render_layer.h
@@ -142,7 +142,7 @@ public:
     RenderLayer *firstChild() const { return m_first; }
     RenderLayer *lastChild() const { return m_last; }
 
-    void addChild(RenderLayer *newChild, RenderLayer* beforeChild = 0);
+    void addChild(RenderLayer *newChild, RenderLayer* beforeChild = nullptr);
     RenderLayer* removeChild(RenderLayer *oldChild);
 
     void removeOnlyThisLayer();
diff --git a/tdehtml/rendering/render_line.cpp b/tdehtml/rendering/render_line.cpp
index d8bc8d0e2..fea0b0e59 100644
--- a/tdehtml/rendering/render_line.cpp
+++ b/tdehtml/rendering/render_line.cpp
@@ -175,7 +175,7 @@ void InlineFlowBox::removeFromLine(InlineBox *child)
         child->prevOnLine()->m_next = child->nextOnLine();
     }
 
-    child->setParent(0);
+    child->setParent(nullptr);
 }
 
 bool InlineBox::canAccommodateEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth)
@@ -919,7 +919,7 @@ void RootInlineBox::detachEllipsisBox(RenderArena* arena)
 {
     if (m_ellipsisBox) {
         m_ellipsisBox->detach(arena);
-        m_ellipsisBox = 0;
+        m_ellipsisBox = nullptr;
     }
 }
 
diff --git a/tdehtml/rendering/render_line.h b/tdehtml/rendering/render_line.h
index 8d4c8a256..414c67991 100644
--- a/tdehtml/rendering/render_line.h
+++ b/tdehtml/rendering/render_line.h
@@ -37,9 +37,9 @@ public:
     :m_object(obj), m_x(0), m_width(0), m_y(0), m_height(0), m_baseline(0),
      m_firstLine(false), m_constructed(false)
     {
-        m_next = 0;
-        m_prev = 0;
-        m_parent = 0;
+        m_next = nullptr;
+        m_prev = nullptr;
+        m_parent = nullptr;
     }
 
     virtual ~InlineBox() {}
@@ -146,8 +146,8 @@ public:
     InlineRunBox(RenderObject* obj)
     :InlineBox(obj)
     {
-        m_prevLine = 0;
-        m_nextLine = 0;
+        m_prevLine = nullptr;
+        m_nextLine = nullptr;
     }
 
     InlineRunBox* prevLineBox() { return m_prevLine; }
@@ -169,8 +169,8 @@ public:
     InlineFlowBox(RenderObject* obj)
     :InlineRunBox(obj)
     {
-        m_firstChild = 0;
-        m_lastChild = 0;
+        m_firstChild = nullptr;
+        m_lastChild = nullptr;
         m_includeLeftEdge = m_includeRightEdge = false;
         m_hasTextChildren = false;
         m_hasTextDescendant = false;
@@ -276,7 +276,7 @@ protected:
 class RootInlineBox : public InlineFlowBox
 {
 public:
-    RootInlineBox(RenderObject* obj) : InlineFlowBox(obj), m_ellipsisBox(0)
+    RootInlineBox(RenderObject* obj) : InlineFlowBox(obj), m_ellipsisBox(nullptr)
     {
         m_topOverflow = m_bottomOverflow = 0;
     }
@@ -293,7 +293,7 @@ public:
     virtual void setOverflowPositions(int top, int bottom) { m_topOverflow = top; m_bottomOverflow = bottom; }
 
     bool canAccommodateEllipsis(bool ltr, int blockEdge, int lineBoxEdge, int ellipsisWidth);
-    void placeEllipsis(const DOM::DOMString& ellipsisStr, bool ltr, int blockEdge, int ellipsisWidth, InlineBox* markupBox = 0);
+    void placeEllipsis(const DOM::DOMString& ellipsisStr, bool ltr, int blockEdge, int ellipsisWidth, InlineBox* markupBox = nullptr);
     virtual int placeEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth, bool&);
 
     EllipsisBox* ellipsisBox() const { return m_ellipsisBox; }
diff --git a/tdehtml/rendering/render_list.cpp b/tdehtml/rendering/render_list.cpp
index 17caa26ae..467756c5a 100644
--- a/tdehtml/rendering/render_list.cpp
+++ b/tdehtml/rendering/render_list.cpp
@@ -54,8 +54,8 @@ RenderListItem::RenderListItem(DOM::NodeImpl* node)
     setInline(false);   // our object is not Inline
 
     predefVal = -1;
-    m_marker = 0;
-    m_counter = 0;
+    m_marker = nullptr;
+    m_counter = nullptr;
     m_insideList = false;
     m_deleteMarker = false;
 }
@@ -77,7 +77,7 @@ void RenderListItem::setStyle(RenderStyle *_style)
         m_deleteMarker = true;
     } else if ( m_marker && style()->listStyleType() == LNONE) {
         m_marker->detach();
-        m_marker = 0;
+        m_marker = nullptr;
     }
     else if ( m_marker ) {
         m_marker->setStyle(newStyle);
@@ -97,7 +97,7 @@ static RenderObject* getParentOfFirstLineBox(RenderObject* curr, RenderObject* m
 {
     RenderObject* firstChild = curr->firstChild();
     if (!firstChild)
-        return 0;
+        return nullptr;
 
     for (RenderObject* currChild = firstChild;
          currChild; currChild = currChild->nextSibling()) {
@@ -122,7 +122,7 @@ static RenderObject* getParentOfFirstLineBox(RenderObject* curr, RenderObject* m
             return lineBox;
     }
 
-    return 0;
+    return nullptr;
 }
 
 
@@ -190,7 +190,7 @@ void RenderListItem::layout( )
 // -----------------------------------------------------------
 
 RenderListMarker::RenderListMarker(DOM::NodeImpl* node)
-    : RenderBox(node), m_listImage(0), m_markerWidth(0)
+    : RenderBox(node), m_listImage(nullptr), m_markerWidth(0)
 {
     // init RenderObject attributes
     setInline(true);   // our object is Inline
@@ -247,7 +247,7 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int _tx, int _ty)
 
 
     // The marker needs to adjust its tx, for the case where it's an outside marker.
-    RenderObject* listItem = 0;
+    RenderObject* listItem = nullptr;
     int leftLineOffset = 0;
     int rightLineOffset = 0;
     if (!listPositionInside()) {
diff --git a/tdehtml/rendering/render_list.h b/tdehtml/rendering/render_list.h
index 9797d5114..c9f6d0484 100644
--- a/tdehtml/rendering/render_list.h
+++ b/tdehtml/rendering/render_list.h
@@ -69,7 +69,7 @@ public:
 protected:
 
     void updateMarkerLocation();
-    void resetListMarker() { m_marker = 0; }
+    void resetListMarker() { m_marker = nullptr; }
 
     RenderListMarker *m_marker;
     CounterNode *m_counter;
diff --git a/tdehtml/rendering/render_object.cpp b/tdehtml/rendering/render_object.cpp
index b1a9bdffc..cf788d00c 100644
--- a/tdehtml/rendering/render_object.cpp
+++ b/tdehtml/rendering/render_object.cpp
@@ -95,7 +95,7 @@ void RenderObject::operator delete(void* ptr, size_t sz)
 
 RenderObject *RenderObject::createObject(DOM::NodeImpl* node,  RenderStyle* style)
 {
-    RenderObject *o = 0;
+    RenderObject *o = nullptr;
     tdehtml::RenderArena* arena = node->getDocument()->renderArena();
     switch(style->display())
     {
@@ -147,11 +147,11 @@ RenderObject *RenderObject::createObject(DOM::NodeImpl* node,  RenderStyle* styl
 
 RenderObject::RenderObject(DOM::NodeImpl* node)
     : CachedObjectClient(),
-      m_style( 0 ),
+      m_style( nullptr ),
       m_node( node ),
-      m_parent( 0 ),
-      m_previous( 0 ),
-      m_next( 0 ),
+      m_parent( nullptr ),
+      m_previous( nullptr ),
+      m_next( nullptr ),
       m_verticalPosition( PositionUndefined ),
       m_needsLayout( false ),
       m_normalChildNeedsLayout( false ),
@@ -262,7 +262,7 @@ void RenderObject::addChild(RenderObject* , RenderObject *)
 RenderObject* RenderObject::removeChildNode(RenderObject* )
 {
     TDEHTMLAssert(0);
-    return 0;
+    return nullptr;
 }
 
 void RenderObject::removeChild(RenderObject *o )
@@ -294,7 +294,7 @@ RenderObject *RenderObject::nextRenderer() const
         if (r)
             return r->nextSibling();
     }
-    return 0;
+    return nullptr;
 }
 
 RenderObject *RenderObject::previousRenderer() const
@@ -309,7 +309,7 @@ RenderObject *RenderObject::previousRenderer() const
         return parent();
     }
     else {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -322,7 +322,7 @@ static void addLayers(RenderObject* obj, RenderLayer* parentLayer, RenderObject*
             // this the first time we find a child layer, and then we update the
             // pointer values for newObject and beforeChild used by everyone else.
             beforeChild = newObject->parent()->findNextLayer(parentLayer, newObject);
-            newObject = 0;
+            newObject = nullptr;
         }
         parentLayer->addChild(obj->layer(), beforeChild);
         return;
@@ -338,7 +338,7 @@ void RenderObject::addLayers(RenderLayer* parentLayer, RenderObject* newObject)
         return;
 
     RenderObject* object = newObject;
-    RenderLayer* beforeChild = 0;
+    RenderLayer* beforeChild = nullptr;
     ::addLayers(this, parentLayer, object, beforeChild);
 }
 
@@ -377,7 +377,7 @@ RenderLayer* RenderObject::findNextLayer(RenderLayer* parentLayer, RenderObject*
 {
     // Error check the parent layer passed in.  If it's null, we can't find anything.
     if (!parentLayer)
-        return 0;
+        return nullptr;
 
     // Step 1: If our layer is a child of the desired parent, then return our layer.
     RenderLayer* ourLayer = layer();
@@ -389,7 +389,7 @@ RenderLayer* RenderObject::findNextLayer(RenderLayer* parentLayer, RenderObject*
     if (!ourLayer || ourLayer == parentLayer) {
         for (RenderObject* curr = startPoint ? startPoint->nextSibling() : firstChild();
              curr; curr = curr->nextSibling()) {
-            RenderLayer* nextLayer = curr->findNextLayer(parentLayer, 0, false);
+            RenderLayer* nextLayer = curr->findNextLayer(parentLayer, nullptr, false);
             if (nextLayer)
                 return nextLayer;
         }
@@ -398,14 +398,14 @@ RenderLayer* RenderObject::findNextLayer(RenderLayer* parentLayer, RenderObject*
     // Step 3: If our layer is the desired parent layer, then we're finished.  We didn't
     // find anything.
     if (parentLayer == ourLayer)
-        return 0;
+        return nullptr;
 
     // Step 4: If |checkParent| is set, climb up to our parent and check its siblings that
     // follow us to see if we can locate a layer.
     if (checkParent && parent())
         return parent()->findNextLayer(parentLayer, this, true);
 
-    return 0;
+    return nullptr;
 }
 
 RenderLayer* RenderObject::enclosingLayer() const
@@ -417,7 +417,7 @@ RenderLayer* RenderObject::enclosingLayer() const
             return layer;
         curr = curr->parent();
     }
-    return 0;
+    return nullptr;
 }
 
 RenderLayer* RenderObject::enclosingStackingContext() const
@@ -482,7 +482,7 @@ int RenderObject::offsetTop() const
 RenderObject* RenderObject::offsetParent() const
 {
     if (isBody())
-        return 0;
+        return nullptr;
 
     // can't really use containing blocks here (#113280)
     bool skipTables = isPositioned() || isRelPositioned();
@@ -632,7 +632,7 @@ RenderBlock *RenderObject::containingBlock() const
             p->printTree();
 #endif
         }
-        return 0L;
+        return nullptr;
     }
 
     return static_cast<RenderBlock*>( o );
@@ -1190,7 +1190,7 @@ void RenderObject::printTree(int indent) const
     kdDebug() << ind << information() << endl;
 
     RenderObject *child = firstChild();
-    while( child != 0 )
+    while( child )
     {
         child->printTree(indent+2);
         child = child->nextSibling();
@@ -1333,7 +1333,7 @@ void RenderObject::setStyle(RenderStyle *style)
 
     setShouldPaintBackgroundOrBorder(m_style->hasBorder() || m_style->hasBackground());
 
-    m_hasFirstLine = (style->getPseudoStyle(RenderStyle::FIRST_LINE) != 0);
+    m_hasFirstLine = (style->getPseudoStyle(RenderStyle::FIRST_LINE) != nullptr);
     if (m_parent) {
         if (d == RenderStyle::Position && !attemptDirectLayerTranslation())
             d = RenderStyle::Layout;
@@ -1349,7 +1349,7 @@ void RenderObject::setStyle(RenderStyle *style)
             if (layer()) {
                 if (canvas() && canvas()->needsWidgetMasks()) {
                     // update our widget masks
-                    RenderLayer *p, *d = 0;
+                    RenderLayer *p, *d = nullptr;
                     for (p=layer()->parent();p;p=p->parent())
                         if (p->hasOverlaidWidgets()) d=p;
                     if (d) // deepest
@@ -1453,7 +1453,7 @@ void RenderObject::setOverhangingContents(bool p)
         RenderObject *n;
         bool c=false;
 
-        for( n = firstChild(); n != 0; n = n->nextSibling() )
+        for( n = firstChild(); n; n = n->nextSibling() )
         {
             if (n->isPositioned() || n->overhangingContents())
                 c=true;
@@ -1474,8 +1474,8 @@ void RenderObject::setOverhangingContents(bool p)
 void RenderObject::updateBackgroundImages(RenderStyle* oldStyle)
 {
     // FIXME: This will be slow when a large number of images is used.  Fix by using a dict.
-    const BackgroundLayer* oldLayers = oldStyle ? oldStyle->backgroundLayers() : 0;
-    const BackgroundLayer* newLayers = m_style ? m_style->backgroundLayers() : 0;
+    const BackgroundLayer* oldLayers = oldStyle ? oldStyle->backgroundLayers() : nullptr;
+    const BackgroundLayer* newLayers = m_style ? m_style->backgroundLayers() : nullptr;
     for (const BackgroundLayer* currOld = oldLayers; currOld; currOld = currOld->next()) {
         if (currOld->backgroundImage() && (!newLayers || !newLayers->containsImage(currOld->backgroundImage())))
             currOld->backgroundImage()->deref(this);
@@ -1574,7 +1574,7 @@ RenderObject *RenderObject::container() const
     // the layout of the positioned object.  This does mean that calcAbsoluteHorizontal and
     // calcAbsoluteVertical have to use container().
     EPosition pos = m_style->position();
-    RenderObject *o = 0;
+    RenderObject *o = nullptr;
     if( pos == FIXED ) {
         // container() can be called on an object that is not in the
         // tree yet.  We don't call canvas() since it will assert if it
@@ -1651,7 +1651,7 @@ void RenderObject::detach()
 
     // make sure our DOM-node don't think we exist
     if ( node() && node()->renderer() == this)
-        node()->setRenderer(0);
+        node()->setRenderer(nullptr);
 
     // by default no refcounting
     arenaDelete(renderArena(), this);
@@ -1697,7 +1697,7 @@ FindSelectionResult RenderObject::checkSelectionPoint( int _x, int _y, int _tx,
         }
     }
     //kdDebug(6030) << "nodeAtPoint Failed. Fallback - hmm, SelectionPointAfter" << endl;
-    node = 0;
+    node = nullptr;
     offset = 0;
     return SelectionPointAfter;
 #endif
@@ -1987,7 +1987,7 @@ void RenderObject::removeLeftoverAnonymousBoxes()
 InlineBox* RenderObject::createInlineBox(bool /*makePlaceHolderBox*/, bool /*isRootLineBox*/)
 {
     TDEHTMLAssert(false);
-    return 0;
+    return nullptr;
 }
 
 void RenderObject::getTextDecorationColors(int decorations, TQColor& underline, TQColor& overline,
@@ -2087,9 +2087,9 @@ CounterNode* RenderObject::getCounter(const TQString& counter, bool view, bool c
 {
 //     kdDebug( 6040 ) << renderName() << " getCounter(" << counter << ")" << endl;
 
-    if (!style()) return 0;
+    if (!style()) return nullptr;
 
-    if (isText() && !isCounter()) return 0;
+    if (isText() && !isCounter()) return nullptr;
 
     CounterNode *i = lookupCounter(counter);
     if (i) return i;
@@ -2163,7 +2163,7 @@ CounterNode* RenderObject::getCounter(const TQString& counter, bool view, bool c
     insertCounter(counter, i);
 
     if (!isRoot()) {
-        CounterNode *last=0, *current=0;
+        CounterNode *last=nullptr, *current=nullptr;
         RenderObject *n = previousSibling();
         while(n) {
             if (n->hasCounter(counter)) {
@@ -2201,7 +2201,7 @@ CounterNode* RenderObject::getCounter(const TQString& counter, bool view, bool c
                 if (last != sibling)
                     sibling->insertAfter(i, last);
                 else
-                    sibling->insertAfter(i, 0);
+                    sibling->insertAfter(i, nullptr);
             }
             else if (last->parent())
                 last->parent()->insertAfter(i, last);
@@ -2210,7 +2210,7 @@ CounterNode* RenderObject::getCounter(const TQString& counter, bool view, bool c
             // Nothing found among siblings, let our parent search
             last = parent()->getCounter(counter, false);
             if (last->isReset())
-                last->insertAfter(i, 0);
+                last->insertAfter(i, nullptr);
             else if (last->parent())
                 last->parent()->insertAfter(i, last);
         }
@@ -2225,7 +2225,7 @@ CounterNode* RenderObject::lookupCounter(const TQString& counter) const
     if (counters)
         return counters->find(counter);
     else
-        return 0;
+        return nullptr;
 }
 
 void RenderObject::detachCounters()
diff --git a/tdehtml/rendering/render_object.h b/tdehtml/rendering/render_object.h
index 325a24024..931dd842f 100644
--- a/tdehtml/rendering/render_object.h
+++ b/tdehtml/rendering/render_object.h
@@ -145,8 +145,8 @@ public:
     RenderObject *previousSibling() const { return m_previous; }
     RenderObject *nextSibling() const { return m_next; }
 
-    virtual RenderObject *firstChild() const { return 0; }
-    virtual RenderObject *lastChild() const { return 0; }
+    virtual RenderObject *firstChild() const { return nullptr; }
+    virtual RenderObject *lastChild() const { return nullptr; }
 
     RenderObject *nextRenderer() const; 
     RenderObject *previousRenderer() const; 
@@ -155,7 +155,7 @@ public:
     virtual int borderTopExtra() const { return 0; }
     virtual int borderBottomExtra() const { return 0; }
 
-    virtual RenderLayer* layer() const { return 0; }
+    virtual RenderLayer* layer() const { return nullptr; }
     RenderLayer* enclosingLayer() const;
     RenderLayer* enclosingStackingContext() const;
     void addLayers(RenderLayer* parentLayer, RenderObject* newObject);
@@ -180,7 +180,7 @@ public:
     bool scrollsOverflowY() const { return  hasOverflowClip() && (style()->overflowY() == OSCROLL || style()->overflowY() == OAUTO); }
 
     virtual int getBaselineOfFirstLineBox() { return -1; } // Tables and blocks implement this.
-    virtual InlineFlowBox* getFirstLineBox() { return 0; } // Tables and blocks implement this.
+    virtual InlineFlowBox* getFirstLineBox() { return nullptr; } // Tables and blocks implement this.
 
     // Whether or not a positioned element requires normal flow x/y to be computed
     // to determine its position.
@@ -207,7 +207,7 @@ protected:
 public:
     //////////////////////////////////////////
     // RenderObject tree manipulation
-    virtual void addChild(RenderObject *newChild, RenderObject *beforeChild = 0);
+    virtual void addChild(RenderObject *newChild, RenderObject *beforeChild = nullptr);
     void removeChild(RenderObject *oldChild);
 
     // raw tree manipulation
@@ -246,7 +246,7 @@ private:
 
 public:
     RenderArena* renderArena() const;
-    virtual RenderFlow* continuation() const { return 0; }
+    virtual RenderFlow* continuation() const { return nullptr; }
     virtual bool isInlineContinuation() const { return false; }
 
 
@@ -315,7 +315,7 @@ public:
     RenderCanvas* canvas() const;
     // don't even think about making this method virtual!
     DOM::DocumentImpl* document() const;
-    DOM::NodeImpl* element() const { return isAnonymous() ? 0L : m_node; }
+    DOM::NodeImpl* element() const { return isAnonymous() ? nullptr : m_node; }
     DOM::NodeImpl* node() const { return m_node; }
 
    /**
@@ -355,7 +355,7 @@ public:
     void setHasOverflowClip(bool b = true) { m_hasOverflowClip = b; }
     void setIsSelectionBorder(bool b=true) { m_isSelectionBorder = b; }
 
-    void scheduleRelayout(RenderObject *clippedObj = 0);
+    void scheduleRelayout(RenderObject *clippedObj = nullptr);
 
     void updateBackgroundImages(RenderStyle* oldStyle);
 
@@ -364,7 +364,7 @@ public:
     virtual short lineHeight( bool firstLine ) const;
     virtual short verticalPositionHint( bool firstLine ) const;
     virtual short baselinePosition( bool firstLine ) const;
-    short getVerticalPosition( bool firstLine, RenderObject* ref=0 ) const;
+    short getVerticalPosition( bool firstLine, RenderObject* ref=nullptr ) const;
 
     /*
      * Print the object and its children, clipped by (x|y|w|h).
@@ -372,7 +372,7 @@ public:
      */
     struct PaintInfo {
        PaintInfo(TQPainter* _p, const TQRect& _r, PaintAction _phase)
-           : p(_p), r(_r), phase(_phase), outlineObjects(0) {}
+           : p(_p), r(_r), phase(_phase), outlineObjects(nullptr) {}
        ~PaintInfo() { delete outlineObjects; }
        TQPainter* p;
        TQRect     r;
@@ -499,7 +499,7 @@ public:
         friend class DOM::HTMLAreaElementImpl;
     public:
         NodeInfo(bool readonly, bool active)
-            : m_innerNode(0), m_innerNonSharedNode(0), m_innerURLElement(0), m_readonly(readonly), m_active(active)
+            : m_innerNode(nullptr), m_innerNonSharedNode(nullptr), m_innerURLElement(nullptr), m_readonly(readonly), m_active(active)
             { }
 
         DOM::NodeImpl* innerNode() const { return m_innerNode; }
@@ -530,7 +530,7 @@ public:
 	/** true when the last node had the result SelectionAfterInLine */
 	bool m_afterInLine;
 
-	SelPointState() : m_lastNode(0), m_lastOffset(0), m_afterInLine(false)
+	SelPointState() : m_lastNode(nullptr), m_lastOffset(0), m_afterInLine(false)
 	{}
     };
 
@@ -692,7 +692,7 @@ public:
     virtual bool hasOverhangingFloats() const { return false; }
     virtual bool hasFloats() const { return false; }
     virtual bool containsFloat(RenderObject* /*o*/) const { return false; }
-    virtual void markAllDescendantsWithFloatsForLayout(RenderObject* /*floatToRemove*/ = 0) {}
+    virtual void markAllDescendantsWithFloatsForLayout(RenderObject* /*floatToRemove*/ = nullptr) {}
 
     bool flowAroundFloats() const;
     bool usesLineWidth() const;
@@ -751,7 +751,7 @@ public:
     virtual void calcVerticalMargins() {}
     void removeFromObjectLists();
 
-    virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;}
+    virtual void deleteInlineBoxes(RenderArena* arena=nullptr) {(void)arena;}
     virtual void detach( );
 
     void setDoNotDelete(bool b) { m_doNotDelete = b; }
diff --git a/tdehtml/rendering/render_replaced.cpp b/tdehtml/rendering/render_replaced.cpp
index 0e5666b9d..24ac51e61 100644
--- a/tdehtml/rendering/render_replaced.cpp
+++ b/tdehtml/rendering/render_replaced.cpp
@@ -95,7 +95,7 @@ void RenderReplaced::position(InlineBox* box, int /*from*/, int /*len*/, bool /*
 RenderWidget::RenderWidget(DOM::NodeImpl* node)
         : RenderReplaced(node)
 {
-    m_widget = 0;
+    m_widget = nullptr;
     // a widget doesn't support being anonymous
     assert(!isAnonymous());
     m_view  = node->getDocument()->view();
@@ -193,7 +193,7 @@ bool RenderWidget::event( TQEvent *e )
 
 void RenderWidget::flushWidgetResizes() //static
 {
-    TQApplication::sendPostedEvents( 0, TQWidgetResizeEvent::Type );
+    TQApplication::sendPostedEvents( nullptr, TQWidgetResizeEvent::Type );
 }
 
 void RenderWidget::setQWidget(TQWidget *widget)
@@ -205,7 +205,7 @@ void RenderWidget::setQWidget(TQWidget *widget)
             disconnect( m_widget, TQ_SIGNAL( destroyed()), this, TQ_SLOT( slotWidgetDestructed()));
             m_widget->hide();
             m_widget->deleteLater(); //Might happen due to event on the widget, so be careful
-            m_widget = 0;
+            m_widget = nullptr;
         }
         m_widget = widget;
         if (m_widget) {
@@ -347,7 +347,7 @@ void RenderWidget::slotWidgetDestructed()
 {
     if (m_view)
        m_view->setWidgetVisible(this, false);
-    m_widget = 0;
+    m_widget = nullptr;
 }
 
 void RenderWidget::setStyle(RenderStyle *_style)
@@ -477,7 +477,7 @@ protected:
     TQPixmap *getBuf( TQSize s ) {
         assert( !m_grabbed );
         if (s.isEmpty())
-            return 0;
+            return nullptr;
 
         m_grabbed = true;
         bool cur_overflow = false;
@@ -517,7 +517,7 @@ private:
     int m_resetHeight;
 };
 
-PaintBuffer *PaintBuffer::m_inst = 0;
+PaintBuffer *PaintBuffer::m_inst = nullptr;
 
 static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx, int ty)
 {
@@ -575,7 +575,7 @@ static void copyWidget(const TQRect& r, TQPainter *p, TQWidget *widget, int tx,
     TQPainter::redirect(widget, pm);
     TQPaintEvent e( r, false );
     TQApplication::sendEvent( widget, &e );
-    TQPainter::redirect(widget, 0);
+    TQPainter::redirect(widget, nullptr);
 
     // transfer result
     if ( external )
diff --git a/tdehtml/rendering/render_style.cpp b/tdehtml/rendering/render_style.cpp
index a2ae70948..35ea658bb 100644
--- a/tdehtml/rendering/render_style.cpp
+++ b/tdehtml/rendering/render_style.cpp
@@ -110,7 +110,7 @@ BackgroundLayer::BackgroundLayer()
  m_bgOrigin(RenderStyle::initialBackgroundOrigin()),
  m_bgRepeat(RenderStyle::initialBackgroundRepeat()),
  m_backgroundSize(RenderStyle::initialBackgroundSize()),
- m_next(0)
+ m_next(nullptr)
 {
     m_imageSet = m_attachmentSet = m_clipSet = m_originSet = 
             m_repeatSet = m_xPosSet = m_yPosSet = m_backgroundSizeSet = false;
@@ -118,7 +118,7 @@ BackgroundLayer::BackgroundLayer()
 
 BackgroundLayer::BackgroundLayer(const BackgroundLayer& o)
 {
-    m_next = o.m_next ? new BackgroundLayer(*o.m_next) : 0;
+    m_next = o.m_next ? new BackgroundLayer(*o.m_next) : nullptr;
     m_image = o.m_image;
     m_xPosition = o.m_xPosition;
     m_yPosition = o.m_yPosition;
@@ -145,7 +145,7 @@ BackgroundLayer::~BackgroundLayer()
 BackgroundLayer& BackgroundLayer::operator=(const BackgroundLayer& o) {
     if (m_next != o.m_next) {
         delete m_next;
-        m_next = o.m_next ? new BackgroundLayer(*o.m_next) : 0;
+        m_next = o.m_next ? new BackgroundLayer(*o.m_next) : nullptr;
     }
 
     m_image = o.m_image;
@@ -280,7 +280,7 @@ void BackgroundLayer::cullEmptyLayers()
             !next->isBackgroundOriginSet() && !next->isBackgroundRepeatSet() &&
             !next->isBackgroundSizeSet()) {
             delete next;
-            p->m_next = 0;
+            p->m_next = nullptr;
             break;
         }
     }
@@ -298,7 +298,7 @@ bool StyleBackgroundData::operator==(const StyleBackgroundData& o) const
     return m_background == o.m_background && m_color == o.m_color && m_outline == o.m_outline;
 }
 
-StyleGeneratedData::StyleGeneratedData() : Shared<StyleGeneratedData>(), content(0), counter_reset(0), counter_increment(0) {}
+StyleGeneratedData::StyleGeneratedData() : Shared<StyleGeneratedData>(), content(nullptr), counter_reset(nullptr), counter_increment(nullptr) {}
 
 StyleGeneratedData::~StyleGeneratedData() 
 {
@@ -308,7 +308,7 @@ StyleGeneratedData::~StyleGeneratedData()
 }
 
 StyleGeneratedData::StyleGeneratedData(const StyleGeneratedData& o)
-    : Shared<StyleGeneratedData>(), content(0),
+    : Shared<StyleGeneratedData>(), content(nullptr),
       counter_reset(o.counter_reset), counter_increment(o.counter_increment)
 {
     if (o.content) content = new ContentData(*o.content);
@@ -429,7 +429,7 @@ bool StyleCSS3NonInheritedData::operator==(const StyleCSS3NonInheritedData& o) c
 }
 
 StyleCSS3InheritedData::StyleCSS3InheritedData()
-:Shared<StyleCSS3InheritedData>(), textShadow(0), wordWrap(RenderStyle::initialWordWrap())
+:Shared<StyleCSS3InheritedData>(), textShadow(nullptr), wordWrap(RenderStyle::initialWordWrap())
 #ifdef APPLE_CHANGES
 , userModify(READ_ONLY), textSizeAdjust(RenderStyle::initialTextSizeAdjust())
 #endif
@@ -440,7 +440,7 @@ StyleCSS3InheritedData::StyleCSS3InheritedData()
 StyleCSS3InheritedData::StyleCSS3InheritedData(const StyleCSS3InheritedData& o)
 :Shared<StyleCSS3InheritedData>()
 {
-    textShadow = o.textShadow ? new ShadowData(*o.textShadow) : 0;
+    textShadow = o.textShadow ? new ShadowData(*o.textShadow) : nullptr;
     wordWrap = o.wordWrap;
 #ifdef APPLE_CHANGES
     userModify = o.userModify;
@@ -478,7 +478,7 @@ StyleInheritedData::StyleInheritedData()
       border_hspacing( RenderStyle::initialBorderHorizontalSpacing() ),
       border_vspacing( RenderStyle::initialBorderVerticalSpacing() ),
       widows( RenderStyle::initialWidows() ), orphans( RenderStyle::initialOrphans() ),
-      quotes(0)
+      quotes(nullptr)
 {
 }
 
@@ -537,7 +537,7 @@ RenderStyle::RenderStyle()
 
     setBitDefaults();
 
-    pseudoStyle = 0;
+    pseudoStyle = nullptr;
 }
 
 RenderStyle::RenderStyle(bool)
@@ -557,7 +557,7 @@ RenderStyle::RenderStyle(bool)
     css3InheritedData.init();
     inherited.init();
 
-    pseudoStyle = 0;
+    pseudoStyle = nullptr;
 }
 
 RenderStyle::RenderStyle(const RenderStyle& o)
@@ -565,7 +565,7 @@ RenderStyle::RenderStyle(const RenderStyle& o)
       inherited_flags( o.inherited_flags ), noninherited_flags( o.noninherited_flags ),
       box( o.box ), visual( o.visual ), background( o.background ), surround( o.surround ), generated(o.generated),
       css3NonInheritedData( o.css3NonInheritedData ), css3InheritedData( o.css3InheritedData ),
-      inherited( o.inherited ), pseudoStyle( 0 )
+      inherited( o.inherited ), pseudoStyle( nullptr )
 {}
 
 void RenderStyle::inheritFrom(const RenderStyle* inheritParent)
@@ -582,7 +582,7 @@ void RenderStyle::inheritFrom(const RenderStyle* inheritParent)
 RenderStyle::~RenderStyle()
 {
     RenderStyle *ps = pseudoStyle;
-    RenderStyle *prev = 0;
+    RenderStyle *prev = nullptr;
 
     while (ps) {
         prev = ps;
@@ -590,7 +590,7 @@ RenderStyle::~RenderStyle()
 	// to prevent a double deletion.
 	// this works only because the styles below aren't really shared
 	// Dirk said we need another construct as soon as these are shared
-        prev->pseudoStyle = 0;
+        prev->pseudoStyle = nullptr;
         prev->deref();
     }
 }
@@ -653,9 +653,9 @@ void RenderStyle::setHasPseudoStyle(PseudoId pseudo, bool b)
 
 RenderStyle* RenderStyle::getPseudoStyle(PseudoId pid) const
 {
-    if (!hasPseudoStyle(pid)) return 0;
+    if (!hasPseudoStyle(pid)) return nullptr;
 
-    RenderStyle *ps = 0;
+    RenderStyle *ps = nullptr;
     if (noninherited_flags.f._styleType==NOPSEUDO)
         for (ps = pseudoStyle; ps; ps = ps->pseudoStyle)
             if (ps->noninherited_flags.f._styleType==pid)
@@ -667,7 +667,7 @@ RenderStyle* RenderStyle::addPseudoStyle(PseudoId pid)
 {
     if (hasPseudoStyle(pid)) return getPseudoStyle(pid);
 
-    RenderStyle *ps = 0;
+    RenderStyle *ps = nullptr;
 
     switch (pid) {
         case FIRST_LETTER:             // pseudo-elements (FIRST_LINE has a special handling)
@@ -872,12 +872,12 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
 }
 
 
-RenderStyle* RenderStyle::_default = 0;
+RenderStyle* RenderStyle::_default = nullptr;
 
 void RenderStyle::cleanup()
 {
     delete _default;
-    _default = 0;
+    _default = nullptr;
 }
 
 void RenderStyle::setPaletteColor(TQPalette::ColorGroup g, TQColorGroup::ColorRole r, const TQColor& c)
@@ -1036,9 +1036,9 @@ void RenderStyle::addContent(EQuoteContent q)
 
 // content: normal is the same as having no content at all
 void RenderStyle::setContentNormal() {
-    if (generated->content != 0) {
+    if (generated->content) {
         delete generated->content;
-        generated.access()->content = 0;
+        generated.access()->content = nullptr;
     }
 }
 
@@ -1053,7 +1053,7 @@ void RenderStyle::setContentData(ContentData *data) {
         if (data)
             generated.access()->content = new ContentData(*data);
         else
-            generated.access()->content = 0;
+            generated.access()->content = nullptr;
     }
 }
 
@@ -1079,7 +1079,7 @@ ContentData::ContentData(const ContentData& o) : _contentType(o._contentType)
             break;
     }
 
-    _nextContent = o._nextContent ? new ContentData(*o._nextContent) : 0;
+    _nextContent = o._nextContent ? new ContentData(*o._nextContent) : nullptr;
 }
 
 ContentData::~ContentData()
@@ -1090,20 +1090,20 @@ ContentData::~ContentData()
 void ContentData::clearContent()
 {
     delete _nextContent;
-    _nextContent = 0;
+    _nextContent = nullptr;
 
     switch (_contentType)
     {
         case CONTENT_OBJECT:
-            _content.object = 0;
+            _content.object = nullptr;
             break;
         case CONTENT_TEXT:
             _content.text->deref();
-            _content.text = 0;
+            _content.text = nullptr;
             break;
         case CONTENT_COUNTER:
             _content.counter->deref();
-            _content.counter = 0;
+            _content.counter = nullptr;
             break;
         case CONTENT_QUOTE:
             _content.quote = NO_QUOTE;
@@ -1130,7 +1130,7 @@ void RenderStyle::setTextShadow(ShadowData* val, bool add)
 ShadowData::ShadowData(const ShadowData& o)
 :x(o.x), y(o.y), blur(o.blur), color(o.color)
 {
-    next = o.next ? new ShadowData(*o.next) : 0;
+    next = o.next ? new ShadowData(*o.next) : nullptr;
 }
 
 bool ShadowData::operator==(const ShadowData& o) const
@@ -1147,7 +1147,7 @@ static bool hasCounter(const DOM::DOMString& c, CSSValueListImpl *l)
     int len = l->length();
     for(int i=0; i<len; i++) {
         CounterActImpl* ca = static_cast<CounterActImpl*>(l->item(i));
-        Q_ASSERT(ca != 0);
+        Q_ASSERT(ca);
         if (ca->m_counter == c) return true;
     }
     return false;
@@ -1174,7 +1174,7 @@ static short readCounter(const DOM::DOMString& c, CSSValueListImpl *l)
     int len = l->length();
     for(int i=0; i<len; i++) {
         CounterActImpl* ca = static_cast<CounterActImpl*>(l->item(i));
-        Q_ASSERT(ca != 0);
+        Q_ASSERT(ca);
         if (ca->m_counter == c) return ca->m_value;
     }
     return 0;
@@ -1250,7 +1250,7 @@ TQString RenderStyle::createDiff( const RenderStyle &parent ) const
 }
 #endif
 
-RenderPageStyle::RenderPageStyle() : next(0), m_pageType(ANY_PAGE)
+RenderPageStyle::RenderPageStyle() : next(nullptr), m_pageType(ANY_PAGE)
 {
 }
 
@@ -1261,7 +1261,7 @@ RenderPageStyle::~RenderPageStyle()
 
 RenderPageStyle* RenderPageStyle::getPageStyle(PageType type)
 {
-    RenderPageStyle *ps = 0;
+    RenderPageStyle *ps = nullptr;
     for (ps = this; ps; ps = ps->next)
         if (ps->m_pageType==type)
             break;
diff --git a/tdehtml/rendering/render_style.h b/tdehtml/rendering/render_style.h
index fbf62a161..3fbe21112 100644
--- a/tdehtml/rendering/render_style.h
+++ b/tdehtml/rendering/render_style.h
@@ -81,7 +81,7 @@ public:
 
     DataRef()
     {
-	data=0;
+	data=nullptr;
     }
     DataRef( const DataRef<DATA> &d )
     {
@@ -261,7 +261,7 @@ enum EBorderPrecedence { BOFF, BTABLE, BCOLGROUP, BCOL, BROWGROUP, BROW, BCELL }
 
 struct CollapsedBorderValue
 {
-    CollapsedBorderValue() :border(0), precedence(BOFF) {}
+    CollapsedBorderValue() :border(nullptr), precedence(BOFF) {}
     CollapsedBorderValue(const BorderValue* b, EBorderPrecedence p) :border(b), precedence(p) {}
 
     int width() const { return border && border->nonZero() ? border->width : 0; }
@@ -570,17 +570,17 @@ enum ContentType {
 };
 
 struct ContentData {
-    ContentData() : _contentType( CONTENT_NONE ), _nextContent(0) {}
+    ContentData() : _contentType( CONTENT_NONE ), _nextContent(nullptr) {}
     ContentData(const ContentData& o);
     ~ContentData();
     void clearContent();
 
     DOM::DOMStringImpl* contentText()
-    { if (_contentType == CONTENT_TEXT) return _content.text; return 0; }
+    { if (_contentType == CONTENT_TEXT) return _content.text; return nullptr; }
     CachedObject* contentObject()
-    { if (_contentType == CONTENT_OBJECT) return _content.object; return 0; }
+    { if (_contentType == CONTENT_OBJECT) return _content.object; return nullptr; }
     DOM::CounterImpl* contentCounter()
-    { if (_contentType == CONTENT_COUNTER) return _content.counter; return 0; }
+    { if (_contentType == CONTENT_COUNTER) return _content.counter; return nullptr; }
     EQuoteContent contentQuote()
     { if (_contentType == CONTENT_QUOTE) return _content.quote; return NO_QUOTE; }
 
@@ -645,7 +645,7 @@ public:
 // This struct holds information about shadows for the text-shadow and box-shadow properties.
 struct ShadowData {
     ShadowData(int _x, int _y, int _blur, const TQColor& _color)
-    :x(_x), y(_y), blur(_blur), color(_color), next(0) {}
+    :x(_x), y(_y), blur(_blur), color(_color), next(nullptr) {}
     ShadowData(const ShadowData& o);
 
     ~ShadowData() { delete next; }
@@ -1371,7 +1371,7 @@ public:
         const_cast<StyleVisualData *>(visual.get())->palette = TQApplication::palette();
     }
 
-    bool useNormalContent() const { return generated->content == 0; }
+    bool useNormalContent() const { return generated->content == nullptr; }
     ContentData* contentData() const { return generated->content; }
     bool contentDataEquivalent(const RenderStyle* otherStyle) const
     {
@@ -1440,7 +1440,7 @@ public:
     static EPosition initialPosition() { return STATIC; }
     static ETableLayout initialTableLayout() { return TAUTO; }
     static EUnicodeBidi initialUnicodeBidi() { return UBNormal; }
-    static DOM::QuotesValueImpl* initialQuotes() { return 0; }
+    static DOM::QuotesValueImpl* initialQuotes() { return nullptr; }
     static EBoxSizing initialBoxSizing() { return CONTENT_BOX; }
     static ETextTransform initialTextTransform() { return TTNONE; }
     static EVisibility initialVisibility() { return VISIBLE; }
@@ -1451,8 +1451,8 @@ public:
     static short initialBorderVerticalSpacing() { return 0; }
     static ECursor initialCursor() { return CURSOR_AUTO; }
     static TQColor initialColor() { return TQt::black; }
-    static CachedImage* initialBackgroundImage() { return 0; }
-    static CachedImage* initialListStyleImage() { return 0; }
+    static CachedImage* initialBackgroundImage() { return nullptr; }
+    static CachedImage* initialListStyleImage() { return nullptr; }
     static unsigned short initialBorderWidth() { return 3; }
     static int initialLetterWordSpacing() { return 0; }
     static Length initialSize() { return Length(); }
diff --git a/tdehtml/rendering/render_table.cpp b/tdehtml/rendering/render_table.cpp
index bd4002a37..affde3067 100644
--- a/tdehtml/rendering/render_table.cpp
+++ b/tdehtml/rendering/render_table.cpp
@@ -55,10 +55,10 @@ RenderTable::RenderTable(DOM::NodeImpl* node)
     : RenderBlock(node)
 {
 
-    tCaption = 0;
-    head = foot = firstBody = 0;
-    tableLayout = 0;
-    m_currentBorder = 0;
+    tCaption = nullptr;
+    head = foot = firstBody = nullptr;
+    tableLayout = nullptr;
+    m_currentBorder = nullptr;
 
     has_col_elems = false;
     hspacing = vspacing = 0;
@@ -215,7 +215,7 @@ void RenderTable::addChild(RenderObject *child, RenderObject *beforeChild)
     }
 
     if (beforeChild && !beforeChild->isTableSection())
-        beforeChild = 0;
+        beforeChild = nullptr;
     RenderTableSection* section = new (renderArena()) RenderTableSection(document() /* anonymous */);
     RenderStyle* newStyle = new RenderStyle();
     newStyle->inheritFrom(style());
@@ -494,7 +494,7 @@ void RenderTable::paint( PaintInfo& pI, int _tx, int _ty)
                     child->paint(pI, _tx, _ty);
             }
         }
-        m_currentBorder = 0;
+        m_currentBorder = nullptr;
     }
 
     pI.phase = oldphase;
@@ -586,7 +586,7 @@ void RenderTable::splitColumn( int pos, int firstSpan )
 		RenderTableSection::Row &r = *section->grid[row].row;
 		memmove( r.data()+pos+1, r.data()+pos, (oldSize-pos)*sizeof( RenderTableCell * ) );
 // 		tqDebug("moving from %d to %d, num=%d", pos, pos+1, (oldSize-pos-1) );
-		r[pos+1] = r[pos] ? (RenderTableCell *)-1 : 0;
+		r[pos+1] = r[pos] ? (RenderTableCell *)-1 : nullptr;
 		row++;
 	    }
 	}
@@ -615,7 +615,7 @@ void RenderTable::appendColumn( int span )
 	    int row = 0;
 	    while ( row < size ) {
 		section->grid[row].row->resize( newSize );
-		section->cellAt( row, pos ) = 0;
+		section->cellAt( row, pos ) = nullptr;
 		row++;
 	    }
 
@@ -628,7 +628,7 @@ void RenderTable::appendColumn( int span )
 
 RenderTableCol *RenderTable::colElement( int col ) {
     if ( !has_col_elems )
-	return 0;
+	return nullptr;
     RenderObject *child = firstChild();
     int cCol = 0;
     while ( child ) {
@@ -652,13 +652,13 @@ RenderTableCol *RenderTable::colElement( int col ) {
         } else
 	    break;
     }
-    return 0;
+    return nullptr;
 }
 
 void RenderTable::recalcSections()
 {
-    tCaption = 0;
-    head = foot = firstBody = 0;
+    tCaption = nullptr;
+    head = foot = firstBody = nullptr;
     has_col_elems = false;
 
     RenderObject *child = firstChild();
@@ -764,7 +764,7 @@ int RenderTable::borderBottom() const
 RenderTableSection* RenderTable::sectionAbove(const RenderTableSection* section, bool skipEmptySections) const
 {
     if (section == head)
-        return 0;
+        return nullptr;
     RenderObject *prevSection = (section == foot ? lastChild() : const_cast<RenderTableSection *>(section))->previousSibling();
     while (prevSection) {
         if (prevSection->isTableSection() && prevSection != head && prevSection != foot && (!skipEmptySections || static_cast<RenderTableSection*>(prevSection)->numRows()))
@@ -779,7 +779,7 @@ RenderTableSection* RenderTable::sectionAbove(const RenderTableSection* section,
 RenderTableSection* RenderTable::sectionBelow(const RenderTableSection* section, bool skipEmptySections) const
 {
     if (section == foot)
-        return 0;
+        return nullptr;
     RenderObject *nextSection = (section == head ? firstChild() : const_cast<RenderTableSection *>(section))->nextSibling();
     while (nextSection) {
         if (nextSection->isTableSection() && nextSection != head && nextSection != foot && (!skipEmptySections || static_cast<RenderTableSection*>(nextSection)->numRows()))
@@ -795,7 +795,7 @@ RenderTableCell* RenderTable::cellAbove(const RenderTableCell* cell) const
 {
     // Find the section and row to look in
     int r = cell->row();
-    RenderTableSection* section = 0;
+    RenderTableSection* section = nullptr;
     int rAbove = 0;
     if (r > 0) {
         // cell is not in the first row, so use the above row in its own section
@@ -816,9 +816,9 @@ RenderTableCell* RenderTable::cellAbove(const RenderTableCell* cell) const
             aboveCell = section->cellAt(rAbove, effCol);
             effCol--;
         } while (aboveCell == (RenderTableCell *)-1 && effCol >=0);
-        return (aboveCell == (RenderTableCell *)-1) ? 0 : aboveCell;
+        return (aboveCell == (RenderTableCell *)-1) ? nullptr : aboveCell;
     } else {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -826,7 +826,7 @@ RenderTableCell* RenderTable::cellBelow(const RenderTableCell* cell) const
 {
     // Find the section and row to look in
     int r = cell->row() + cell->rowSpan() - 1;
-    RenderTableSection* section = 0;
+    RenderTableSection* section = nullptr;
     int rBelow = 0;
     if (r < cell->section()->numRows()-1) {
         // The cell is not in the last row, so use the next row in the section.
@@ -847,9 +847,9 @@ RenderTableCell* RenderTable::cellBelow(const RenderTableCell* cell) const
             belowCell = section->cellAt(rBelow, effCol);
             effCol--;
         } while (belowCell == (RenderTableCell *)-1 && effCol >=0);
-        return (belowCell == (RenderTableCell *)-1) ? 0 : belowCell;
+        return (belowCell == (RenderTableCell *)-1) ? nullptr : belowCell;
     } else {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -858,7 +858,7 @@ RenderTableCell* RenderTable::cellLeft(const RenderTableCell* cell) const
     RenderTableSection* section = cell->section();
     int effCol = colToEffCol(cell->col());
     if (effCol == 0)
-        return 0;
+        return nullptr;
 
     // If we hit a colspan back up to a real cell.
     RenderTableCell* prevCell;
@@ -866,16 +866,16 @@ RenderTableCell* RenderTable::cellLeft(const RenderTableCell* cell) const
         prevCell = section->cellAt(cell->row(), effCol-1);
         effCol--;
     } while (prevCell == (RenderTableCell *)-1 && effCol >=0);
-    return (prevCell == (RenderTableCell *)-1) ? 0 : prevCell;
+    return (prevCell == (RenderTableCell *)-1) ? nullptr : prevCell;
 }
 
 RenderTableCell* RenderTable::cellRight(const RenderTableCell* cell) const
 {
     int effCol = colToEffCol(cell->col()+cell->colSpan());
     if (effCol >= numEffCols())
-        return 0;
+        return nullptr;
     RenderTableCell* result = cell->section()->cellAt(cell->row(), effCol);
-    return (result == (RenderTableCell*)-1) ? 0 : result;
+    return (result == (RenderTableCell*)-1) ? nullptr : result;
 }
 
 #ifdef ENABLE_DUMP
@@ -1061,8 +1061,8 @@ void RenderTableSection::ensureRows( int numRows )
         grid.resize( numRows );
         for ( int r = nRows; r < numRows; r++ ) {
             grid[r].row = new Row( nCols );
-            grid[r].row->fill( 0 );
-            grid[r].rowRenderer = 0;
+            grid[r].row->fill( nullptr );
+            grid[r].rowRenderer = nullptr;
             grid[r].baseLine = 0;
             grid[r].height = Length();
         }
@@ -1710,7 +1710,7 @@ void RenderTableSection::paint( PaintInfo& pI, int tx, int ty )
 
 	    unsigned int c = startcol;
 	    Row *row = grid[r].row;
-	    Row *nextrow = (r < endrow - 1) ? grid[r+1].row : 0;
+	    Row *nextrow = (r < endrow - 1) ? grid[r+1].row : nullptr;
 	    // since a cell can be -1 (indicating a colspan) we might have to search backwards to include it
 	    while ( c && (*row)[c] == (RenderTableCell *)-1 )
 		c--;
@@ -1725,7 +1725,7 @@ void RenderTableSection::paint( PaintInfo& pI, int tx, int ty )
                     // We need to handle painting a stack of backgrounds.  This stack (from bottom to top) consists of
                     // the column group, column, row group, row, and then the cell.
                     RenderObject* col = table()->colElement(c);
-                    RenderObject* colGroup = 0;
+                    RenderObject* colGroup = nullptr;
                     if (col) {
                         RenderStyle *style = col->parent()->style();
                         if (style->display() == TABLE_COLUMN_GROUP)
@@ -1865,7 +1865,7 @@ void RenderTableSection::dump(TQTextStream &stream, const TQString &ind) const
 
 static RenderTableCell *seekCell(RenderTableSection *section, int row, int col)
 {
-    if (row < 0 || col < 0 || row >= section->numRows()) return 0;
+    if (row < 0 || col < 0 || row >= section->numRows()) return nullptr;
     // since a cell can be -1 (indicating a colspan) we might have to search backwards to include it
     while ( col && section->cellAt( row, col ) == (RenderTableCell *)-1 )
 	col--;
@@ -2551,7 +2551,7 @@ CollapsedBorderValue RenderTableCell::collapsedTopBorder() const
 
     // (4) The previous row's bottom border.
     if (prevCell) {
-        RenderObject* prevRow = 0;
+        RenderObject* prevRow = nullptr;
         if (prevCell->section() == section())
             prevRow = parent()->previousSibling();
         else
@@ -2793,7 +2793,7 @@ public:
             }
         }
 
-        return 0;
+        return nullptr;
     }
 
     CollapsedBorder borders[4];
@@ -3023,7 +3023,7 @@ TableSectionIterator &TableSectionIterator::operator ++()
     if (sec) return *this;
 
   } else if (sec == table->foot) {
-    sec = 0;
+    sec = nullptr;
     return *this;
 
   } else {
@@ -3051,7 +3051,7 @@ TableSectionIterator &TableSectionIterator::operator --()
     if (sec) return *this;
 
   } else if (sec == table->head) {
-    sec = 0;
+    sec = nullptr;
     return *this;
 
   } else {
diff --git a/tdehtml/rendering/render_table.h b/tdehtml/rendering/render_table.h
index 09695e3d8..b15055650 100644
--- a/tdehtml/rendering/render_table.h
+++ b/tdehtml/rendering/render_table.h
@@ -84,7 +84,7 @@ public:
     void setCellPadding( uint p ) { padding = p; }
 
     // overrides
-    virtual void addChild(RenderObject *child, RenderObject *beforeChild = 0);
+    virtual void addChild(RenderObject *child, RenderObject *beforeChild = nullptr);
     virtual void paint( PaintInfo&, int tx, int ty);
     virtual void paintBoxDecorations(PaintInfo&, int _tx, int _ty);
     virtual void layout();
@@ -204,7 +204,7 @@ public:
     virtual const char *renderName() const { return "RenderTableSection"; }
 
     // overrides
-    virtual void addChild(RenderObject *child, RenderObject *beforeChild = 0);
+    virtual void addChild(RenderObject *child, RenderObject *beforeChild = nullptr);
     virtual bool isTableSection() const { return true; }
 
     virtual short lineHeight(bool) const { return 0; }
@@ -303,7 +303,7 @@ public:
     virtual void setStyle( RenderStyle* );
     virtual const char *renderName() const { return "RenderTableRow"; }
     virtual bool isTableRow() const { return true; }
-    virtual void addChild(RenderObject *child, RenderObject *beforeChild = 0);
+    virtual void addChild(RenderObject *child, RenderObject *beforeChild = nullptr);
 
     virtual short offsetWidth() const;
     virtual int offsetHeight() const;
diff --git a/tdehtml/rendering/render_text.cpp b/tdehtml/rendering/render_text.cpp
index c2bf27af5..24cd8b5c5 100644
--- a/tdehtml/rendering/render_text.cpp
+++ b/tdehtml/rendering/render_text.cpp
@@ -203,7 +203,7 @@ inline const RenderStyle *retrieveSelectionPseudoStyle(const RenderObject *obj)
 
     obj = obj->parent();
   }/*wend*/
-  return 0;
+  return nullptr;
 }
 
 void InlineTextBox::paintSelection(const Font *f, RenderText *text, TQPainter *p, RenderStyle* style, int tx, int ty, int startPos, int endPos, int deco)
@@ -658,7 +658,7 @@ int InlineTextBoxArray::findFirstMatching(Item d) const
     while ( n1 <= n2 ) {
 	int  res;
 	mid = (n1 + n2)/2;
-	if ( (*this)[mid] == 0 )			// null item greater
+	if (!(*this)[mid])			// null item greater
 	    res = -1;
 	else
 	    res = ((TQGVector*)this)->compareItems( d, (*this)[mid] );
@@ -755,7 +755,7 @@ bool RenderText::isTextFragment() const
 
 DOM::DOMStringImpl* RenderText::originalString() const
 {
-    return element() ? element()->string() : 0;
+    return element() ? element()->string() : nullptr;
 }
 
 InlineTextBox * RenderText::findInlineTextBox( int offset, int &pos, bool checkFirstLetter )
@@ -784,7 +784,7 @@ InlineTextBox * RenderText::findInlineTextBox( int offset, int &pos, bool checkF
 #endif
 
     if ( m_lines.isEmpty() )
-        return 0L;
+        return nullptr;
 
     // The text boxes don't resemble a contiguous coverage of the text, there
     // may be holes. Therefore, we snap to the nearest previous text box if
@@ -822,7 +822,7 @@ bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, H
 
     bool inside = false;
     if (style()->visibility() != HIDDEN) {
-        InlineTextBox *s = m_lines.count() ? m_lines[0] : 0;
+        InlineTextBox *s = m_lines.count() ? m_lines[0] : nullptr;
         int si = 0;
         while(s) {
             if((_y >=_ty + s->m_y) && (_y < _ty + s->m_y + s->m_height) &&
@@ -831,7 +831,7 @@ bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, H
                 break;
             }
 
-            s = si < (int) m_lines.count()-1 ? m_lines[++si] : 0;
+            s = si < (int) m_lines.count()-1 ? m_lines[++si] : nullptr;
         }
     }
 
@@ -844,8 +844,8 @@ bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, H
             info.setInnerNode(element());
 
             // Clear everything else.
-            info.setInnerNonSharedNode(0);
-            info.setURLElement(0);
+            info.setInnerNonSharedNode(nullptr);
+            info.setURLElement(nullptr);
         }
 
         if (!info.innerNode())
@@ -864,7 +864,7 @@ FindSelectionResult RenderText::checkSelectionPoint(int _x, int _y, int _tx, int
 //                     << " _tx=" << _tx << " _ty=" << _ty << endl;
 //kdDebug(6040) << renderName() << "::checkSelectionPoint x=" << xPos() << " y=" << yPos() << " w=" << width() << " h=" << height() << " m_lines.count=" << m_lines.count() << endl;
 
-    NodeImpl *lastNode = 0;
+    NodeImpl *lastNode = nullptr;
     int lastOffset = 0;
     FindSelectionResult lastResult = SelectionPointAfter;
 
@@ -1362,7 +1362,7 @@ const TQFontMetrics &RenderText::metrics(bool firstLine) const
 
 const Font *RenderText::htmlFont(bool firstLine) const
 {
-    const Font *f = 0;
+    const Font *f = nullptr;
     if( firstLine && hasFirstLine() ) {
 	RenderStyle *pseudoStyle  = style()->getPseudoStyle(RenderStyle::FIRST_LINE);
 	if ( pseudoStyle )
@@ -1509,7 +1509,7 @@ void RenderText::dump(TQTextStream &stream, const TQString &ind) const
 RenderTextFragment::RenderTextFragment(DOM::NodeImpl* _node, DOM::DOMStringImpl* _str,
                                        int startOffset, int endOffset)
 :RenderText(_node, _str->substring(startOffset, endOffset)),
-m_start(startOffset), m_end(endOffset), m_generatedContentStr(0)
+m_start(startOffset), m_end(endOffset), m_generatedContentStr(nullptr)
 {}
 
 RenderTextFragment::RenderTextFragment(DOM::NodeImpl* _node, DOM::DOMStringImpl* _str)
@@ -1537,7 +1537,7 @@ bool RenderTextFragment::isTextFragment() const
 
 DOM::DOMStringImpl* RenderTextFragment::originalString() const
 {
-    DOM::DOMStringImpl* result = 0;
+    DOM::DOMStringImpl* result = nullptr;
     if (element())
         result = element()->string();
     else
diff --git a/tdehtml/rendering/render_text.h b/tdehtml/rendering/render_text.h
index 073c328ed..f7fa2cbfc 100644
--- a/tdehtml/rendering/render_text.h
+++ b/tdehtml/rendering/render_text.h
@@ -146,7 +146,7 @@ public:
 private:
     // this is just for TQPtrVector::bsearch. Don't use it otherwise
     InlineTextBox(int _x, int _y)
-        :InlineBox(0)
+        :InlineBox(nullptr)
     {
         m_x = _x;
         m_y = _y;
@@ -184,7 +184,7 @@ public:
 
     virtual void paint( PaintInfo& i, int tx, int ty );
 
-    virtual void deleteInlineBoxes(RenderArena* arena=0);
+    virtual void deleteInlineBoxes(RenderArena* arena=nullptr);
 
     DOM::DOMString data() const { return str; }
     DOM::DOMStringImpl *string() const { return str; }
@@ -201,7 +201,7 @@ public:
 						     SelPointState & );
 
     unsigned int length() const { if (str) return str->l; else return 0; }
-    TQChar *text() const { if (str) return str->s; else return 0; }
+    TQChar *text() const { if (str) return str->s; else return nullptr; }
     unsigned int stringLength() const { return str->l; } // non virtual implementation of length()
     virtual void position(InlineBox* box, int from, int len, bool reverse);
 
diff --git a/tdehtml/rendering/table_layout.cpp b/tdehtml/rendering/table_layout.cpp
index 97a6a4c91..4e4cee054 100644
--- a/tdehtml/rendering/table_layout.cpp
+++ b/tdehtml/rendering/table_layout.cpp
@@ -380,14 +380,14 @@ void AutoTableLayout::recalcColumn( int effCol )
     RenderObject *child = table->firstChild();
     // first we iterate over all rows.
 
-    RenderTableCell *fixedContributor = 0;
-    RenderTableCell *maxContributor = 0;
+    RenderTableCell *fixedContributor = nullptr;
+    RenderTableCell *maxContributor = nullptr;
 
     while ( child ) {
 	if ( child->isTableSection() ) {
 	    RenderTableSection *section = static_cast<RenderTableSection *>(child);
 	    int numRows = section->numRows();
-	    RenderTableCell *last = 0;
+	    RenderTableCell *last = nullptr;
 	    for ( int i = 0; i < numRows; i++ ) {
 		RenderTableCell *cell = section->cellAt( i,  effCol );
 		if ( cell == (RenderTableCell *)-1 )
@@ -458,7 +458,7 @@ void AutoTableLayout::recalcColumn( int effCol )
 	if ( table->style()->htmlHacks()
 	     && (l.maxWidth > l.width.value()) && (fixedContributor != maxContributor)) {
 	    l.width = Length();
-	    fixedContributor = 0;
+	    fixedContributor = nullptr;
 	}
     }
 
@@ -480,7 +480,7 @@ void AutoTableLayout::fullRecalc()
     int nEffCols = table->numEffCols();
     layoutStruct.resize( nEffCols );
     layoutStruct.fill( Layout() );
-    spanCells.fill( 0 );
+    spanCells.fill( nullptr );
 
     RenderObject *child = table->firstChild();
     Length grpWidth;
@@ -543,7 +543,7 @@ static bool shouldScaleColumns(RenderTable* table)
                 cb->style()->width().isVariable() && !cb->isPositioned())
                 cb = cb->containingBlock();
 
-            table = 0;
+            table = nullptr;
             if (cb && cb->isTableCell() &&
                 (cb->style()->width().isVariable() || cb->style()->width().isPercent())) {
                 if (tw.isPercent())
@@ -558,7 +558,7 @@ static bool shouldScaleColumns(RenderTable* table)
             }
         }
         else
-            table = 0;
+            table = nullptr;
     }
     return scale;
 }
@@ -851,10 +851,10 @@ void AutoTableLayout::insertSpanCell( RenderTableCell *cell )
 
 //     tqDebug("inserting span cell %p with span %d", cell, cell->colSpan() );
     int size = spanCells.size();
-    if ( !size || spanCells[size-1] != 0 ) {
+    if ( !size || spanCells[size-1] ) {
 	spanCells.resize( size + 10 );
 	for ( int i = 0; i < 10; i++ )
-	    spanCells[size+i] = 0;
+	    spanCells[size+i] = nullptr;
 	size += 10;
     }
 
diff --git a/tdehtml/tdehtml_caret.cpp b/tdehtml/tdehtml_caret.cpp
index 8bc787c1f..7a90faa48 100644
--- a/tdehtml/tdehtml_caret.cpp
+++ b/tdehtml/tdehtml_caret.cpp
@@ -86,7 +86,7 @@ static RenderObject* traverseRenderObjects(RenderObject *obj,
         state |= AdvancedToSibling;
       } else {
         r = obj->parent();
-        if (r == base) r = 0;
+        if (r == base) r = nullptr;
         trav = InsideAscending;
         state |= LeftObject;
       }
@@ -195,7 +195,7 @@ static RenderObject *advanceObject(RenderObject *r,
   bool ignoreOutsideDesc = toBegin && origtrav == OutsideAscending;
 
   // render object and traversal state at which look ahead has been started
-  RenderObject *la = 0;
+  RenderObject *la = nullptr;
   ObjectTraversalState latrav = trav;
   ObjectTraversalState lasttrav = origtrav;
 
@@ -339,7 +339,7 @@ static NodeImpl *nextLeafNode(NodeImpl *r, NodeImpl *baseElem)
   }/*end if*/
 
   n = r->parentNode();
-  if (n == baseElem) n = 0;
+  if (n == baseElem) n = nullptr;
   while (n) {
     r = n;
     n = r->nextSibling();
@@ -350,9 +350,9 @@ static NodeImpl *nextLeafNode(NodeImpl *r, NodeImpl *baseElem)
       return const_cast<NodeImpl *>(r);
     }/*end if*/
     n = r->parentNode();
-    if (n == baseElem) n = 0;
+    if (n == baseElem) n = nullptr;
   }/*wend*/
-  return 0;
+  return nullptr;
 }
 
 #if 0		// currently not used
@@ -380,7 +380,7 @@ static NodeImpl *prevLeafNode(NodeImpl *r, NodeImpl *baseElem)
   }/*end if*/
 
   n = r->parentNode();
-  if (n == baseElem) n = 0;
+  if (n == baseElem) n = nullptr;
   while (n) {
     r = n;
     n = r->previousSibling();
@@ -391,7 +391,7 @@ static NodeImpl *prevLeafNode(NodeImpl *r, NodeImpl *baseElem)
       return const_cast<NodeImpl *>(r);
     }/*end if*/
     n = r->parentNode();
-    if (n == baseElem) n = 0;
+    if (n == baseElem) n = nullptr;
   }/*wend*/
   return 0;
 }
@@ -464,7 +464,7 @@ void /*TDE_NO_EXPORT*/ mapDOMPosToRenderPos(NodeImpl *node, long offset,
     }
 
   } else {
-    r = 0;
+    r = nullptr;
     kdWarning() << k_funcinfo << "Mapping from nodes of type " << node->nodeType()
         << " not supported!" << endl;
   }
@@ -585,14 +585,14 @@ static RenderObject* findRenderer(NodeImpl *&node, long offset,
 			RenderObject *base, long &r_ofs,
                         bool &outside, bool &outsideEnd)
 {
-  if (!node) return 0;
+  if (!node) return nullptr;
   RenderObject *r;
   mapDOMPosToRenderPos(node, offset, r, r_ofs, outside, outsideEnd);
 #if DEBUG_CARETMODE > 2
    kdDebug(6200) << "findRenderer: node " << node << " " << (node ? node->nodeName().string() : TQString::null) << " offset " << offset << " r " << r << "[" << (r ? r->renderName() : TQString::null) << "] r_ofs " << r_ofs << " outside " << outside << " outsideEnd " << outsideEnd << endl;
 #endif
   if (r) return r;
-  NodeImpl *baseElem = base ? base->element() : 0;
+  NodeImpl *baseElem = base ? base->element() : nullptr;
   while (!r) {
     node = nextLeafNode(node, baseElem);
     if (!node) break;
@@ -625,12 +625,12 @@ static ElementImpl *determineBaseElement(NodeImpl *caretNode)
   // and 0 for xml documents.
 
   DocumentImpl *doc = caretNode->getDocument();
-  if (!doc) return 0;	// should not happen, but who knows.
+  if (!doc) return nullptr;	// should not happen, but who knows.
 
   if (doc->isHTMLDocument())
     return static_cast<HTMLDocumentImpl *>(doc)->body();
 
-  return 0;
+  return nullptr;
 }
 
 // == class CaretBox implementation
@@ -928,7 +928,7 @@ void CaretBoxLine::dump(TQTextStream &ts, const TQString &ind) const
  *	is returned instead.
  * @return the root line box or the base flow box.
  */
-inline InlineFlowBox *seekBaseFlowBox(InlineBox *b, RenderObject *base = 0)
+inline InlineFlowBox *seekBaseFlowBox(InlineBox *b, RenderObject *base = nullptr)
 {
   // Seek root line box or base inline flow box, if \c base is interfering.
   while (b->parent() && b->object() != base) {
@@ -967,7 +967,7 @@ static CaretBoxLine* findCaretBoxLine(DOM::NodeImpl *node, long offset,
 {
   bool outside, outsideEnd;
   RenderObject *r = findRenderer(node, offset, base, r_ofs, outside, outsideEnd);
-  if (!r) { return 0; }
+  if (!r) { return nullptr; }
 #if DEBUG_CARETMODE > 0
   kdDebug(6200) << "=================== findCaretBoxLine" << endl;
   kdDebug(6200) << "node " << node << " offset: " << offset << " r " << r->renderName() << "[" << r << "].node " << r->element()->nodeName().string() << "[" << r->element() << "]" << " r_ofs " << r_ofs << " outside " << outside << " outsideEnd " << outsideEnd << endl;
@@ -1016,7 +1016,7 @@ static CaretBoxLine* findCaretBoxLine(DOM::NodeImpl *node, long offset,
   bool isrepl = isBlockRenderReplaced(r);
   if (r->isRenderBlock() || r->isRenderInline() || isrepl) {
     RenderFlow *flow = static_cast<RenderFlow *>(r);
-    InlineFlowBox *firstLineBox = isrepl ? 0 : flow->firstLineBox();
+    InlineFlowBox *firstLineBox = isrepl ? nullptr : flow->firstLineBox();
 
     // On render blocks, if we are outside, or have a totally empty render
     // block, we simply construct a special caret box line.
@@ -1075,7 +1075,7 @@ static CaretBoxLine* findCaretBoxLine(DOM::NodeImpl *node, long offset,
     // construct a caret line box and stop when the element is contained within
     InlineFlowBox *baseFlowBox = seekBaseFlowBox(flowBox, base);
     CaretBoxLine *cbl = CaretBoxLine::constructCaretBoxLine(cblDeleter,
-        baseFlowBox, 0, outside, outsideEnd, caretBoxIt, r);
+        baseFlowBox, nullptr, outside, outsideEnd, caretBoxIt, r);
 #if DEBUG_CARETMODE > 5
     kdDebug(6200) << cbl->information() << endl;
 #endif
@@ -1091,7 +1091,7 @@ static CaretBoxLine* findCaretBoxLine(DOM::NodeImpl *node, long offset,
   // Danger: this is O(n^2). It's only called to recover from
   // errors, that means, theoretically, never. (Practically, far too often :-( )
   Q_ASSERT(!flowBox);
-  CaretBoxLine *cbl = findCaretBoxLine(nextLeafNode(node, base ? base->element() : 0), 0, cblDeleter, base, r_ofs, caretBoxIt);
+  CaretBoxLine *cbl = findCaretBoxLine(nextLeafNode(node, base ? base->element() : nullptr), 0, cblDeleter, base, r_ofs, caretBoxIt);
 #if DEBUG_CARETMODE > 0
   kdDebug(6200) << "=================== end findCaretBoxLine" << endl;
 #endif
@@ -1107,7 +1107,7 @@ static CaretBoxLine* findCaretBoxLine(DOM::NodeImpl *node, long offset,
 static inline RenderTable *findTableUpTo(RenderObject *r, RenderFlow *cb)
 {
   while (r && r != cb && !r->isTable()) r = r->parent();
-  return r && r->isTable() ? static_cast<RenderTable *>(r) : 0;
+  return r && r->isTable() ? static_cast<RenderTable *>(r) : nullptr;
 }
 
 /** checks whether @p r is a descendant of @p cb, or r == cb
@@ -1137,8 +1137,8 @@ static bool containsEditableElement(TDEHTMLPart *part, RenderBlock *cb,
   else
     while (r->firstChild()) r = r->firstChild();
 
-  RenderTable *tempTable = 0;
-  table = 0;
+  RenderTable *tempTable = nullptr;
+  table = nullptr;
   bool withinCb;
 //  int state;		// not used
   ObjectTraversalState trav = InsideDescending;
@@ -1208,8 +1208,8 @@ static bool containsEditableChildElement(TDEHTMLPart *part, RenderBlock *cb,
 // kdDebug(6201) << "child r: " << r << endl;
   if (!r) return false;
 
-  RenderTable *tempTable = 0;
-  table = 0;
+  RenderTable *tempTable = nullptr;
+  table = nullptr;
   bool withinCb = false;
   do {
 
@@ -1245,9 +1245,9 @@ static bool containsEditableChildElement(TDEHTMLPart *part, RenderBlock *cb,
 LinearDocument::LinearDocument(TDEHTMLPart *part, NodeImpl *node, long offset,
   		CaretAdvancePolicy advancePolicy, ElementImpl *baseElem)
 	: node(node), offset(offset), m_part(part),
-	advPol(advancePolicy), base(0)
+	advPol(advancePolicy), base(nullptr)
 {
-  if (node == 0) return;
+  if (!node) return;
 
   if (baseElem) {
     RenderObject *b = baseElem->renderer();
@@ -1276,8 +1276,8 @@ LinearDocument::Iterator LinearDocument::current()
 
 LinearDocument::Iterator LinearDocument::begin()
 {
-  NodeImpl *n = base ? base->element() : 0;
-  if (!base) n = node ? node->getDocument() : 0;
+  NodeImpl *n = base ? base->element() : nullptr;
+  if (!base) n = node ? node->getDocument() : nullptr;
   if (!n) return end();
 
   n = n->firstChild();
@@ -1290,8 +1290,8 @@ LinearDocument::Iterator LinearDocument::begin()
 
 LinearDocument::Iterator LinearDocument::preEnd()
 {
-  NodeImpl *n = base ? base->element() : 0;
-  if (!base) n = node ? node->getDocument() : 0;
+  NodeImpl *n = base ? base->element() : nullptr;
+  if (!base) n = node ? node->getDocument() : nullptr;
   if (!n) return preBegin();
 
   n = n->lastChild();
@@ -1304,12 +1304,12 @@ LinearDocument::Iterator LinearDocument::preEnd()
 
 void LinearDocument::initPreBeginIterator()
 {
-  _preBegin = LineIterator(this, 0, 0);
+  _preBegin = LineIterator(this, nullptr, 0);
 }
 
 void LinearDocument::initEndIterator()
 {
-  _end = LineIterator(this, 0, 1);
+  _end = LineIterator(this, nullptr, 1);
 }
 
 // == class LineIterator implementation
@@ -1321,7 +1321,7 @@ LineIterator::LineIterator(LinearDocument *l, DOM::NodeImpl *node, long offset)
 		: lines(l)
 {
 //  kdDebug(6200) << "LineIterator: node " << node << " offset " << offset << endl;
-  if (!node) { cbl = 0; return; }
+  if (!node) { cbl = nullptr; return; }
   cbl = findCaretBoxLine(node, offset, &lines->cblDeleter,
   		l->baseObject(), currentOffset, currentBox);
   // can happen on partially loaded documents
@@ -1339,7 +1339,7 @@ LineIterator::LineIterator(LinearDocument *l, DOM::NodeImpl *node, long offset)
 #if DEBUG_CARETMODE > 0
     kdDebug(6200) << "LineIterator: findCaretBoxLine failed" << endl;
 #endif
-    cbl = 0;
+    cbl = nullptr;
   }/*end if*/
 }
 
@@ -1361,7 +1361,7 @@ void LineIterator::nextBlock()
 #endif
     r = advanceSuitableObject(r, trav, false, base, state);
     if (!r) {
-      cbl = 0;
+      cbl = nullptr;
       return;
     }/*end if*/
 
@@ -1430,7 +1430,7 @@ void LineIterator::prevBlock()
 #endif
     r = advanceSuitableObject(r, trav, true, base, state);
     if (!r) {
-      cbl = 0;
+      cbl = nullptr;
       return;
     }/*end if*/
 
@@ -1808,7 +1808,7 @@ kdDebug(6200) << "_r " << _r << ":" << _r->element()->nodeName().string() << end
 kdDebug(6200) << "_offset " << _offset << endl;
 #endif
 	} else {
-          b = 0;
+          b = nullptr;
 	  _end = true;
 	}/*end if*/
         goto readchar;
@@ -1873,8 +1873,8 @@ EditableCharacterIterator &EditableCharacterIterator::operator --()
   //kdDebug(6200) << "--: _offset=" << _offset << endl;
 
   CaretBox *box = *ebit;
-  CaretBox *_peekPrev = 0;
-  CaretBox *_peekNext = 0;
+  CaretBox *_peekPrev = nullptr;
+  CaretBox *_peekNext = nullptr;
   InlineBox *b = box->inlineBox();
   long minofs = box->minOffset();
 #if DEBUG_CARETMODE > 0
@@ -1895,7 +1895,7 @@ kdDebug(6200) << "_offset == minofs: " << _offset << " == " << minofs << endl;
     bool do_prev = false;
     {
       EditableCaretBoxIterator copy;
-      _peekPrev = 0;
+      _peekPrev = nullptr;
       do {
         copy = ebit;
         --ebit;
@@ -1985,7 +1985,7 @@ kdDebug(6200) << "_r " << _r << ":" << _r->element()->nodeName().string() << end
 #if DEBUG_CARETMODE > 3
 kdDebug(6200) << "_offset " << _offset << endl;
 #endif
-    _peekPrev = 0;
+    _peekPrev = nullptr;
   } else {
 #if DEBUG_CARETMODE > 0
 kdDebug(6200) << "_offset: " << _offset << " _peekNext: " << _peekNext << endl;
@@ -2073,7 +2073,7 @@ static RenderTableCell *findNearestTableCellInRow(TDEHTMLPart *part, int x,
 static inline RenderTableCell *findNearestTableCell(TDEHTMLPart *part, int x,
 		TableRowIterator &it, bool fromEnd)
 {
-  RenderTableCell *result = 0;
+  RenderTableCell *result = nullptr;
 
   while (*it) {
     result = findNearestTableCellInRow(part, x, *it, fromEnd);
@@ -2151,7 +2151,7 @@ static RenderTableCell *findNearestTableCellInRow(TDEHTMLPart *part, int x,
       return cell;
     }/*end if*/
   }/*next i*/
-  return 0;
+  return nullptr;
 }
 
 /** returns the nearest common ancestor of two objects that is a table cell,
@@ -2163,8 +2163,8 @@ static RenderTableCell *findNearestTableCellInRow(TDEHTMLPart *part, int x,
 static RenderObject *commonAncestorTableSectionOrCell(RenderObject *r1,
 		RenderObject *r2)
 {
-  if (!r1 || !r2) return 0;
-  RenderTableSection *sec = 0;
+  if (!r1 || !r2) return nullptr;
+  RenderTableSection *sec = nullptr;
   int start_depth=0, end_depth=0;
   // First we find the depths of the two objects in the tree (start_depth, end_depth)
   RenderObject *n = r1;
@@ -2245,7 +2245,7 @@ static int findRowInSection(RenderTableSection *section, RenderTableCell *cell,
  */
 static inline RenderTable *findFirstDescendantTable(RenderObject *leaf, RenderBlock *block)
 {
-  RenderTable *result = 0;
+  RenderTable *result = nullptr;
   while (leaf && leaf != block) {
     if (leaf->isTable()) result = static_cast<RenderTable *>(leaf);
     leaf = leaf->parent();
@@ -2381,7 +2381,7 @@ void ErgonomicEditableLineIterator::determineTopologicalElement(
       int state;		// not used
       ObjectTraversalState trav = OutsideAscending;
       r = advanceSuitableObject(r, trav, toBegin, lines->baseObject(), state);
-      if (!r) { cbl = 0;  return; }
+      if (!r) { cbl = nullptr;  return; }
 //      if (toBegin) prevBlock(); else nextBlock();
       newBlock = static_cast<RenderBlock *>(!r || r->isRenderBlock() ? r : r->containingBlock());
     }/*end if*/
@@ -2463,7 +2463,7 @@ static CaretBox *nearestCaretBox(LineIterator &it, CaretViewContext *cv,
 
   // this horizontal position is to be approximated
   x = cv->origX - absx;
-  CaretBox *caretBox = 0; // Inline box containing the caret
+  CaretBox *caretBox = nullptr; // Inline box containing the caret
 //  NodeImpl *lastnode = 0;  // node of previously checked render object.
   int xPos;		   // x-coordinate of current inline box
   int oldXPos = -1;	   // x-coordinate of last inline box
diff --git a/tdehtml/tdehtml_caret_p.h b/tdehtml/tdehtml_caret_p.h
index 7a2d5e06b..556ca73bb 100644
--- a/tdehtml/tdehtml_caret_p.h
+++ b/tdehtml/tdehtml_caret_p.h
@@ -155,14 +155,14 @@ public:
   /** initializes the caret box from the given inline box */
   CaretBox(InlineBox *ibox, bool outside, bool outsideEnd) : _box(ibox),
   	_w((short)ibox->width()), _h(ibox->height()), _x(ibox->xPos()),
-        _y(ibox->yPos()), cb(0), _outside(outside), outside_end(outsideEnd)
+        _y(ibox->yPos()), cb(nullptr), _outside(outside), outside_end(outsideEnd)
   {
     RenderObject *r = ibox->object();
     if (r) cb = r->containingBlock();
   }
   /** initializes the caret box from scratch */
   CaretBox(int x, int y, int w, int h, RenderBox *cb, bool outside, bool outsideEnd) :
-         _box(0), _w((short)w), _h(h), _x(x), _y(y), cb(cb), _outside(outside),
+         _box(nullptr), _w((short)w), _h(h), _x(x), _y(y), cb(cb), _outside(outside),
          outside_end(outsideEnd)
   {}
 
@@ -304,7 +304,7 @@ protected:
   // base flow box which caret boxes have been constructed for
   InlineFlowBox *basefb;
 
-  CaretBoxLine() : caret_boxes(8), basefb(0) {}
+  CaretBoxLine() : caret_boxes(8), basefb(nullptr) {}
   CaretBoxLine(InlineFlowBox *basefb) : caret_boxes(8), basefb(basefb) {}
 public:
 #if DEBUG_CARETMODE > 3
@@ -384,7 +384,7 @@ public:
   static CaretBoxLine *constructCaretBoxLine(MassDeleter<CaretBoxLine> *deleter,
   	InlineFlowBox *baseFlowBox, InlineBox *seekBox, bool seekOutside,
         bool seekOutsideEnd, CaretBoxIterator &iter,
-	RenderObject *seekObject = 0) /*TDE_NO_EXPORT*/;
+	RenderObject *seekObject = nullptr) /*TDE_NO_EXPORT*/;
 
   /** constructs a new caret box line for the given render block.
    * @param deleter deleter which handles alloc+dealloc of the object
@@ -763,7 +763,7 @@ public:
    * beginning with the given caret box iterator, if specified
    */
   EditableCaretBoxIterator(LineIterator &lit, bool fromEnd = false,
-  		CaretBoxIterator *it = 0)
+		CaretBoxIterator *it = nullptr)
   		: CaretBoxIterator(it ? *it : (fromEnd ? (*lit)->end() : (*lit)->preBegin())),
                 m_part(lit.lines->m_part), adjacent(false),
                 advpol(lit.lines->advancePolicy())
@@ -893,7 +893,7 @@ public:
    *	row.
    */
   TableRowIterator(RenderTable *table, bool fromEnd = false,
-  		RenderTableSection::RowStruct *row = 0);
+		RenderTableSection::RowStruct *row = nullptr);
 
   /** Constructs a new iterator.
    * @param section table section to begin with
@@ -913,7 +913,7 @@ public:
    */
   RenderTableSection::RowStruct *operator *()
   {
-    if (!*sec) return 0;
+    if (!*sec) return nullptr;
     return &(*sec)->grid[index];
   }
 
diff --git a/tdehtml/tdehtml_events.cpp b/tdehtml/tdehtml_events.cpp
index 0bb9c6fc3..caa80dfba 100644
--- a/tdehtml/tdehtml_events.cpp
+++ b/tdehtml/tdehtml_events.cpp
@@ -33,7 +33,7 @@ tdehtml::MouseEvent::MouseEvent( const char *name, TQMouseEvent *qmouseEvent, in
 : KParts::Event( name ), m_qmouseEvent( qmouseEvent ), m_x( x ), m_y( y ),
   m_url( url ), m_target(target), m_innerNode( innerNode )
 {
-  d = 0;
+  d = nullptr;
   if (innerNode.handle() && innerNode.handle()->renderer())
       innerNode.handle()->renderer()->absolutePosition(m_nodeAbsX, m_nodeAbsY);
 }
@@ -46,7 +46,7 @@ tdehtml::MouseEvent::~MouseEvent()
 long tdehtml::MouseEvent::offset() const
 {
     int offset = 0;
-    DOM::NodeImpl* tempNode = 0;
+    DOM::NodeImpl* tempNode = nullptr;
     int absX, absY;
     absX = absY = 0;
     if (innerNode().handle()->renderer()) {
diff --git a/tdehtml/tdehtml_ext.cpp b/tdehtml/tdehtml_ext.cpp
index 9b5d2efe5..1a8e8f21c 100644
--- a/tdehtml/tdehtml_ext.cpp
+++ b/tdehtml/tdehtml_ext.cpp
@@ -127,7 +127,7 @@ void TDEHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ )
 {
     TQWidget *oldWidget = m_editableFormWidget;
 
-    m_editableFormWidget = 0;
+    m_editableFormWidget = nullptr;
     enableAction( "cut", false );
     enableAction( "paste", false );
     m_part->emitSelectionChanged();
@@ -235,12 +235,12 @@ void TDEHTMLPartBrowserExtension::copy()
 	*/
 	//if(!cb->selectionModeEnabled())
 	    htmltext = m_part->selectedTextAsHTML();
-	TQTextDrag *textdrag = new TQTextDrag(text, 0L);
+	TQTextDrag *textdrag = new TQTextDrag(text, nullptr);
 	KMultipleDrag *drag = new KMultipleDrag( m_editableFormWidget );
 	drag->addDragObject( textdrag );
 	if(!htmltext.isEmpty()) {
 	    htmltext.replace( TQChar( 0xa0 ), ' ' );
-	    TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L);
+	    TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, nullptr);
 	    htmltextdrag->setSubtype("html");
 	    drag->addDragObject( htmltextdrag );
 	}
@@ -887,7 +887,7 @@ void TDEHTMLPopupGUIClient::saveURL( const KURL &url, const KURL &destURL,
                 {
                     TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
                     TQString errMsgEx= i18n("Try to reinstall it  \n\nThe integration with Konqueror will be disabled!");
-                    KMessageBox::detailedSorry(0,errMsg,errMsgEx);
+                    KMessageBox::detailedSorry(nullptr,errMsg,errMsgEx);
                     cfg.writePathEntry("DownloadManager",TQString::null);
                     cfg.sync ();
                 }
diff --git a/tdehtml/tdehtml_ext.h b/tdehtml/tdehtml_ext.h
index ebdc886f9..08f936f62 100644
--- a/tdehtml/tdehtml_ext.h
+++ b/tdehtml/tdehtml_ext.h
@@ -44,7 +44,7 @@ class TDEHTMLPartBrowserExtension : public KParts::BrowserExtension
   friend class TDEHTMLPart;
   friend class TDEHTMLView;
 public:
-  TDEHTMLPartBrowserExtension( TDEHTMLPart *parent, const char *name = 0L );
+  TDEHTMLPartBrowserExtension( TDEHTMLPart *parent, const char *name = nullptr );
 
   virtual int xOffset();
   virtual int yOffset();
diff --git a/tdehtml/tdehtml_factory.cpp b/tdehtml/tdehtml_factory.cpp
index 2f0233403..724ba11fe 100644
--- a/tdehtml/tdehtml_factory.cpp
+++ b/tdehtml/tdehtml_factory.cpp
@@ -56,13 +56,13 @@ extern "C" TDE_EXPORT void *init_libtdehtml()
     return new TDEHTMLFactory( true );
 }
 
-TDEHTMLFactory *TDEHTMLFactory::s_self = 0;
+TDEHTMLFactory *TDEHTMLFactory::s_self = nullptr;
 unsigned long int TDEHTMLFactory::s_refcnt = 0;
-TDEInstance *TDEHTMLFactory::s_instance = 0;
-TDEAboutData *TDEHTMLFactory::s_about = 0;
-TDEHTMLSettings *TDEHTMLFactory::s_settings = 0;
-TQPtrList<TDEHTMLPart> *TDEHTMLFactory::s_parts = 0;
-TQString *TDEHTMLSettings::avFamilies = 0;
+TDEInstance *TDEHTMLFactory::s_instance = nullptr;
+TDEAboutData *TDEHTMLFactory::s_about = nullptr;
+TDEHTMLSettings *TDEHTMLFactory::s_settings = nullptr;
+TQPtrList<TDEHTMLPart> *TDEHTMLFactory::s_parts = nullptr;
+TQString *TDEHTMLSettings::avFamilies = nullptr;
 
 TDEHTMLFactory::TDEHTMLFactory( bool clone )
 {
@@ -86,11 +86,11 @@ TDEHTMLFactory::~TDEHTMLFactory()
             delete s_parts;
         }
 
-        s_instance = 0;
-        s_about = 0;
-        s_settings = 0;
-        s_parts = 0;
-	TDEHTMLSettings::avFamilies = 0;
+        s_instance = nullptr;
+        s_about = nullptr;
+        s_settings = nullptr;
+        s_parts = nullptr;
+	TDEHTMLSettings::avFamilies = nullptr;
 
         // clean up static data
         tdehtml::CSSStyleSelector::clear();
@@ -137,7 +137,7 @@ void TDEHTMLFactory::deref()
     if ( !--s_refcnt && s_self )
     {
         delete s_self;
-        s_self = 0;
+        s_self = nullptr;
     }
 }
 
@@ -162,7 +162,7 @@ void TDEHTMLFactory::deregisterPart( TDEHTMLPart *part )
         if ( s_parts->isEmpty() )
         {
             delete s_parts;
-            s_parts = 0;
+            s_parts = nullptr;
         }
         deref();
     }
@@ -177,15 +177,15 @@ TDEInstance *TDEHTMLFactory::instance()
     s_about = new TDEAboutData( "tdehtml", I18N_NOOP( "TDEHTML" ), "4.0",
                               I18N_NOOP( "Embeddable HTML component" ),
                               TDEAboutData::License_LGPL );
-    s_about->addAuthor( "Lars Knoll", 0, "knoll@kde.org" );
-    s_about->addAuthor( "Antti Koivisto", 0, "koivisto@kde.org" );
-    s_about->addAuthor( "Waldo Bastian", 0, "bastian@kde.org" );
-    s_about->addAuthor( "Dirk Mueller", 0, "mueller@kde.org" );
-    s_about->addAuthor( "Peter Kelly", 0, "pmk@kde.org" );
-    s_about->addAuthor( "Torben Weis", 0, "weis@kde.org" );
-    s_about->addAuthor( "Martin Jones", 0, "mjones@kde.org" );
-    s_about->addAuthor( "Simon Hausmann", 0, "hausmann@kde.org" );
-    s_about->addAuthor( "Tobias Anton", 0, "anton@stud.fbi.fh-darmstadt.de" );
+    s_about->addAuthor( "Lars Knoll", nullptr, "knoll@kde.org" );
+    s_about->addAuthor( "Antti Koivisto", nullptr, "koivisto@kde.org" );
+    s_about->addAuthor( "Waldo Bastian", nullptr, "bastian@kde.org" );
+    s_about->addAuthor( "Dirk Mueller", nullptr, "mueller@kde.org" );
+    s_about->addAuthor( "Peter Kelly", nullptr, "pmk@kde.org" );
+    s_about->addAuthor( "Torben Weis", nullptr, "weis@kde.org" );
+    s_about->addAuthor( "Martin Jones", nullptr, "mjones@kde.org" );
+    s_about->addAuthor( "Simon Hausmann", nullptr, "hausmann@kde.org" );
+    s_about->addAuthor( "Tobias Anton", nullptr, "anton@stud.fbi.fh-darmstadt.de" );
 
     s_instance = new TDEInstance( s_about );
   }
diff --git a/tdehtml/tdehtml_pagecache.cpp b/tdehtml/tdehtml_pagecache.cpp
index e578144c9..27abd5767 100644
--- a/tdehtml/tdehtml_pagecache.cpp
+++ b/tdehtml/tdehtml_pagecache.cpp
@@ -115,7 +115,7 @@ TDEHTMLPageCacheEntry::fetchData(TQObject *recvObj, const char *recvSlot)
 
 static KStaticDeleter<TDEHTMLPageCache> pageCacheDeleter;
 
-TDEHTMLPageCache *TDEHTMLPageCache::_self = 0;
+TDEHTMLPageCache *TDEHTMLPageCache::_self = nullptr;
 
 TDEHTMLPageCache *
 TDEHTMLPageCache::self()
@@ -184,7 +184,7 @@ TDEHTMLPageCache::cancelEntry(long id)
 bool
 TDEHTMLPageCache::isValid(long id)
 {
-  return (d->dict.find(id) != 0);
+  return (d->dict.find(id) != nullptr);
 }
 
 bool
diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp
index 3b58afe8f..82d7d3b4f 100644
--- a/tdehtml/tdehtml_part.cpp
+++ b/tdehtml/tdehtml_part.cpp
@@ -185,7 +185,7 @@ void tdehtml::ChildFrame::liveConnectEvent(const unsigned long, const TQString &
     if (m_jscript) {
         // we have a jscript => a part in an iframe
         KJS::Completion cmp;
-        m_jscript->evaluate(TQString(), 1, script, 0L, &cmp);
+        m_jscript->evaluate(TQString(), 1, script, nullptr, &cmp);
     } else
         part->executeScript(m_frame->element(), script);
 }
@@ -205,7 +205,7 @@ TDEHTMLFrameList::Iterator TDEHTMLFrameList::find( const TQString &name )
 TDEHTMLPart::TDEHTMLPart( TQWidget *parentWidget, const char *widgetname, TQObject *parent, const char *name, GUIProfile prof )
 : KParts::ReadOnlyPart( parent, name )
 {
-    d = 0;
+    d = nullptr;
     TDEHTMLFactory::registerPart( this );
     setInstance(  TDEHTMLFactory::instance(), prof == BrowserViewGUI && !parentPart() );
     // TODO KDE4 - don't load plugins yet
@@ -216,7 +216,7 @@ TDEHTMLPart::TDEHTMLPart( TQWidget *parentWidget, const char *widgetname, TQObje
 TDEHTMLPart::TDEHTMLPart( TDEHTMLView *view, TQObject *parent, const char *name, GUIProfile prof )
 : KParts::ReadOnlyPart( parent, name )
 {
-    d = 0;
+    d = nullptr;
     TDEHTMLFactory::registerPart( this );
     setInstance(  TDEHTMLFactory::instance(), prof == BrowserViewGUI && !parentPart() );
     // TODO KDE4 - don't load plugins yet
@@ -241,13 +241,13 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof )
   d->m_extension = new TDEHTMLPartBrowserExtension( this, "TDEHTMLBrowserExtension" );
   d->m_hostExtension = new TDEHTMLPartBrowserHostExtension( this );
   d->m_statusBarExtension = new KParts::StatusBarExtension( this );
-  d->m_statusBarIconLabel = 0L;
-  d->m_statusBarPopupLabel = 0L;
+  d->m_statusBarIconLabel = nullptr;
+  d->m_statusBarPopupLabel = nullptr;
   d->m_openableSuppressedPopups = 0;
 
   d->m_bSecurityInQuestion = false;
-  d->m_paLoadImages = 0;
-  d->m_paDebugScript = 0;
+  d->m_paLoadImages = nullptr;
+  d->m_paDebugScript = nullptr;
   d->m_bMousePressed = false;
   d->m_bRightMousePressed = false;
   d->m_bCleared = false;
@@ -273,7 +273,7 @@ void TDEHTMLPart::init( TDEHTMLView *view, GUIProfile prof )
   d->m_paSetEncoding = new TDEActionMenu( i18n( "Set &Encoding" ), "charset", actionCollection(), "setEncoding" );
   d->m_paSetEncoding->setDelayed( false );
 
-  d->m_automaticDetection = new TDEPopupMenu( 0L );
+  d->m_automaticDetection = new TDEPopupMenu( nullptr );
 
   d->m_automaticDetection->insertItem( i18n( "Semi-Automatic" ), 0 );
   d->m_automaticDetection->insertItem( i18n( "Arabic" ), 1 );
@@ -481,11 +481,11 @@ TDEHTMLPart::~TDEHTMLPart()
     delete d->m_statusBarPopupLabel;
   }
 
-  d->m_find = 0; // deleted by its parent, the view.
+  d->m_find = nullptr; // deleted by its parent, the view.
 
   if ( d->m_manager )
   {
-    d->m_manager->setActivePart( 0 );
+    d->m_manager->setActivePart( nullptr );
     // We specify "this" as parent qobject for d->manager, so no need to delete it.
   }
 
@@ -508,17 +508,17 @@ TDEHTMLPart::~TDEHTMLPart()
   {
     d->m_view->hide();
     d->m_view->viewport()->hide();
-    d->m_view->m_part = 0;
+    d->m_view->m_part = nullptr;
   }
 
   // Have to delete this here since we forward declare it in tdehtmlpart_p and
   // at least some compilers won't call the destructor in this case.
   delete d->m_jsedlg;
-  d->m_jsedlg = 0;
+  d->m_jsedlg = nullptr;
 
   if (!parentPart()) // only delete d->m_frame if the top tdehtml_part closes
       delete d->m_frame;
-  delete d; d = 0;
+  delete d; d = nullptr;
   TDEHTMLFactory::deregisterPart( this );
 }
 
@@ -556,7 +556,7 @@ bool TDEHTMLPart::restoreURL( const KURL &url )
 
   TDEHTMLPageCache::self()->fetchData( d->m_cacheId, this, TQ_SLOT(slotRestoreData(const TQByteArray &)));
 
-  emit started( 0L );
+  emit started( nullptr );
 
   return true;
 }
@@ -618,7 +618,7 @@ bool TDEHTMLPart::openURL( const KURL &url )
     } else if (d->m_statusBarUALabel) {
       d->m_statusBarExtension->removeStatusBarItem(d->m_statusBarUALabel);
       delete d->m_statusBarUALabel;
-      d->m_statusBarUALabel = 0L;
+      d->m_statusBarUALabel = nullptr;
     }
   }
 
@@ -645,7 +645,7 @@ bool TDEHTMLPart::openURL( const KURL &url )
     {
         kdDebug( 6050 ) << "TDEHTMLPart::openURL, jumping to anchor. m_url = " << url.url() << endl;
         m_url = url;
-        emit started( 0L );
+        emit started( nullptr );
 
         if ( !gotoAnchor( url.encodedHtmlRef()) )
           gotoAnchor( url.htmlRef() );
@@ -686,7 +686,7 @@ bool TDEHTMLPart::openURL( const KURL &url )
   // copy to m_workingURL after fixing m_url above
   d->m_workingURL = m_url;
 
-  args.metaData().insert("main_frame_request", parentPart() == 0 ? "TRUE" : "FALSE" );
+  args.metaData().insert("main_frame_request", parentPart() ? "FALSE" : "TRUE" );
   args.metaData().insert("ssl_parent_ip", d->m_ssl_parent_ip);
   args.metaData().insert("ssl_parent_cert", d->m_ssl_parent_cert);
   args.metaData().insert("PropagateHttpHeader", "true");
@@ -761,7 +761,7 @@ bool TDEHTMLPart::openURL( const KURL &url )
     connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ),
              this, TQ_SLOT( slotUserSheetStatDone( TDEIO::Job * ) ) );
   }
-  emit started( 0L );
+  emit started( nullptr );
 
   return true;
 }
@@ -772,7 +772,7 @@ bool TDEHTMLPart::closeURL()
   {
     TDEHTMLPageCache::self()->cancelEntry(d->m_cacheId);
     d->m_job->kill();
-    d->m_job = 0;
+    d->m_job = nullptr;
   }
 
   if ( d->m_doc && d->m_doc->isHTMLDocument() ) {
@@ -853,7 +853,7 @@ DOM::HTMLDocument TDEHTMLPart::htmlDocument() const
   if (d->m_doc && d->m_doc->isHTMLDocument())
     return static_cast<HTMLDocumentImpl*>(d->m_doc);
   else
-    return static_cast<HTMLDocumentImpl*>(0);
+    return DOM::HTMLDocument(static_cast<HTMLDocumentImpl *>(nullptr));
 }
 
 DOM::Document TDEHTMLPart::document() const
@@ -875,7 +875,7 @@ TQString TDEHTMLPart::documentSource() const
   } else
   {
     TQString tmpFile;
-    if( TDEIO::NetAccess::download( m_url, tmpFile, NULL ) )
+    if( TDEIO::NetAccess::download( m_url, tmpFile, nullptr ) )
     {
       TQFile f( tmpFile );
       if ( f.open( IO_ReadOnly ) )
@@ -917,7 +917,7 @@ KJS::Interpreter *TDEHTMLPart::jScriptInterpreter()
 {
   KJSProxy *proxy = jScript();
   if (!proxy || proxy->paused())
-    return 0;
+    return nullptr;
 
   return proxy->interpreter();
 }
@@ -996,7 +996,7 @@ static bool createJScript(tdehtml::ChildFrame *frame)
 
 KJSProxy *TDEHTMLPart::jScript()
 {
-  if (!jScriptEnabled()) return 0;
+  if (!jScriptEnabled()) return nullptr;
 
   if ( !d->m_frame ) {
       TDEHTMLPart * p = parentPart();
@@ -1013,11 +1013,11 @@ KJSProxy *TDEHTMLPart::jScript()
               }
       }
       if ( !d->m_frame )
-        return 0;
+        return nullptr;
   }
   if ( !d->m_frame->m_jscript )
     if (!createJScript(d->m_frame))
-      return 0;
+      return nullptr;
   if (d->m_bJScriptDebugEnabled)
     d->m_frame->m_jscript->setDebugEnabled(true);
 
@@ -1064,7 +1064,7 @@ TQVariant TDEHTMLPart::crossFrameExecuteScript(const TQString& target,  const TQ
 
 KJSErrorDlg *TDEHTMLPart::jsErrorExtension() {
   if (!d->m_settings->jsErrorsEnabled()) {
-    return 0L;
+    return nullptr;
   }
 
   if (parentPart()) {
@@ -1098,13 +1098,13 @@ void TDEHTMLPart::removeJSErrorExtension() {
     parentPart()->removeJSErrorExtension();
     return;
   }
-  if (d->m_statusBarJSErrorLabel != 0) {
+  if (d->m_statusBarJSErrorLabel) {
     d->m_statusBarExtension->removeStatusBarItem( d->m_statusBarJSErrorLabel );
     delete d->m_statusBarJSErrorLabel;
-    d->m_statusBarJSErrorLabel = 0;
+    d->m_statusBarJSErrorLabel = nullptr;
   }
   delete d->m_jsedlg;
-  d->m_jsedlg = 0;
+  d->m_jsedlg = nullptr;
 }
 
 void TDEHTMLPart::disableJSErrorExtension() {
@@ -1118,7 +1118,7 @@ void TDEHTMLPart::disableJSErrorExtension() {
 }
 
 void TDEHTMLPart::jsErrorDialogContextMenu() {
-  TDEPopupMenu *m = new TDEPopupMenu(0L);
+  TDEPopupMenu *m = new TDEPopupMenu(nullptr);
   m->insertItem(i18n("&Hide Errors"), this, TQ_SLOT(removeJSErrorExtension()));
   m->insertItem(i18n("&Disable Error Reporting"), this, TQ_SLOT(disableJSErrorExtension()));
   m->popup(TQCursor::pos());
@@ -1262,12 +1262,12 @@ bool TDEHTMLPart::javaEnabled() const
 
 KJavaAppletContext *TDEHTMLPart::javaContext()
 {
-  return 0;
+  return nullptr;
 }
 
 KJavaAppletContext *TDEHTMLPart::createJavaContext()
 {
-  return 0;
+  return nullptr;
 }
 
 void TDEHTMLPart::setPluginsEnabled( bool enable )
@@ -1344,7 +1344,7 @@ void TDEHTMLPart::setAutoloadImages( bool enable )
 
   if ( enable ) {
     delete d->m_paLoadImages;
-    d->m_paLoadImages = 0;
+    d->m_paLoadImages = nullptr;
   }
   else if ( !d->m_paLoadImages )
     d->m_paLoadImages = new TDEAction( i18n( "Display Images on Page" ), "images_display", 0, this, TQ_SLOT( slotLoadImages() ), actionCollection(), "loadImages" );
@@ -1422,10 +1422,10 @@ void TDEHTMLPart::clear()
   if ( d->m_doc ) {
     d->m_doc->deref();
   }
-  d->m_doc = 0;
+  d->m_doc = nullptr;
 
   delete d->m_decoder;
-  d->m_decoder = 0;
+  d->m_decoder = nullptr;
 
   // We don't want to change between parts if we are going to delete all of them anyway
   if (partManager()) {
@@ -1504,14 +1504,14 @@ DOM::HTMLDocumentImpl *TDEHTMLPart::docImpl() const
 {
     if ( d && d->m_doc && d->m_doc->isHTMLDocument() )
         return static_cast<HTMLDocumentImpl*>(d->m_doc);
-    return 0;
+    return nullptr;
 }
 
 DOM::DocumentImpl *TDEHTMLPart::xmlDocImpl() const
 {
     if ( d )
         return d->m_doc;
-    return 0;
+    return nullptr;
 }
 
 void TDEHTMLPart::slotInfoMessage(TDEIO::Job* tdeio_job, const TQString& msg)
@@ -1550,7 +1550,7 @@ void TDEHTMLPart::setPageSecurity( PageSecurity sec )
     if ( d->m_statusBarIconLabel )  {
       d->m_statusBarExtension->removeStatusBarItem( d->m_statusBarIconLabel );
       delete d->m_statusBarIconLabel;
-      d->m_statusBarIconLabel = 0L;
+      d->m_statusBarIconLabel = nullptr;
     }
     break;
   case Encrypted:
@@ -1744,7 +1744,7 @@ void TDEHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& re
   // (so that 'back' works)
   m_url = reqUrl; // same as d->m_workingURL
   d->m_workingURL = KURL();
-  emit started( 0 );
+  emit started( nullptr );
   emit completed();
   return;
   // following disabled until 3.1
@@ -1817,7 +1817,7 @@ void TDEHTMLPart::htmlError( int errorCode, const TQString& text, const KURL& re
 
 void TDEHTMLPart::slotFinished( TDEIO::Job * job )
 {
-  d->m_job = 0L;
+  d->m_job = nullptr;
   d->m_jobspeed = 0L;
 
   if (job->error())
@@ -1846,7 +1846,7 @@ void TDEHTMLPart::slotFinished( TDEIO::Job * job )
   }
   TDEIO::TransferJob *tjob = ::tqt_cast<TDEIO::TransferJob*>(job);
   if (tjob && tjob->isErrorPage()) {
-    tdehtml::RenderPart *renderPart = d->m_frame ? static_cast<tdehtml::RenderPart *>(d->m_frame->m_frame) : 0;
+    tdehtml::RenderPart *renderPart = d->m_frame ? static_cast<tdehtml::RenderPart *>(d->m_frame->m_frame) : nullptr;
     if (renderPart) {
       HTMLObjectElementImpl* elt = static_cast<HTMLObjectElementImpl *>(renderPart->element());
       if (!elt)
@@ -2075,7 +2075,7 @@ void TDEHTMLPart::resetFromScript()
     connect(d->m_doc,TQ_SIGNAL(finishedParsing()),this,TQ_SLOT(slotFinishedParsing()));
     d->m_doc->setParsing(true);
 
-    emit started( 0L );
+    emit started( nullptr );
 }
 
 void TDEHTMLPart::slotFinishedParsing()
@@ -2274,7 +2274,7 @@ void TDEHTMLPart::checkCompleted()
   {
     // DA: Do not start redirection for frames here! That action is
     // deferred until the parent emits a completed signal.
-    if ( parentPart() == 0 ) {
+    if ( !parentPart() ) {
       //kdDebug(6050) << this << " starting redirection timer" << endl;
       d->m_redirectionTimer.start( 1000 * d->m_delayRedirect, true );
     } else {
@@ -2473,7 +2473,7 @@ bool TDEHTMLPart::setEncoding( const TQString &name, bool override )
         // reload document
         closeURL();
         KURL url = m_url;
-        m_url = 0;
+        m_url = nullptr;
         d->m_restored = true;
         openURL(url);
         d->m_restored = false;
@@ -2737,14 +2737,14 @@ void TDEHTMLPart::setCaretVisible(bool show)
 void TDEHTMLPart::findTextBegin()
 {
   d->m_findPos = -1;
-  d->m_findNode = 0;
+  d->m_findNode = nullptr;
   d->m_findPosEnd = -1;
-  d->m_findNodeEnd= 0;
+  d->m_findNodeEnd= nullptr;
   d->m_findPosStart = -1;
-  d->m_findNodeStart = 0;
-  d->m_findNodePrevious = 0;
+  d->m_findNodeStart = nullptr;
+  d->m_findNodePrevious = nullptr;
   delete d->m_find;
-  d->m_find = 0L;
+  d->m_find = nullptr;
 }
 
 bool TDEHTMLPart::initFindNode( bool selection, bool reverse, bool fromCursor )
@@ -2752,7 +2752,7 @@ bool TDEHTMLPart::initFindNode( bool selection, bool reverse, bool fromCursor )
     if ( !d->m_doc )
         return false;
 
-    DOM::NodeImpl* firstNode = 0L;
+    DOM::NodeImpl* firstNode = nullptr;
     if (d->m_doc->isHTMLDocument())
       firstNode = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
     else
@@ -2791,15 +2791,15 @@ bool TDEHTMLPart::initFindNode( bool selection, bool reverse, bool fromCursor )
         d->m_findNode = firstNode;
         d->m_findPos = reverse ? -1 : 0;
       }
-      d->m_findNodeEnd = reverse ? firstNode : 0;
+      d->m_findNodeEnd = reverse ? firstNode : nullptr;
       d->m_findPosEnd = reverse ? 0 : -1;
-      d->m_findNodeStart = !reverse ? firstNode : 0;
+      d->m_findNodeStart = !reverse ? firstNode : nullptr;
       d->m_findPosStart = !reverse ? 0 : -1;
       d->m_findNodePrevious = d->m_findNodeStart;
       if ( reverse )
       {
         // Need to find out the really last object, to start from it
-        tdehtml::RenderObject* obj = d->m_findNode ? d->m_findNode->renderer() : 0;
+        tdehtml::RenderObject* obj = d->m_findNode ? d->m_findNode->renderer() : nullptr;
         if ( obj )
         {
           // find the last object in the render tree
@@ -2990,7 +2990,7 @@ void TDEHTMLPart::slotFindDialogDestroyed()
   d->m_lastFindState.options = d->m_findDialog->options();
   d->m_lastFindState.history = d->m_findDialog->findHistory();
   d->m_findDialog->deleteLater();
-  d->m_findDialog = 0L;
+  d->m_findDialog = nullptr;
 }
 
 void TDEHTMLPart::findText()
@@ -3014,7 +3014,7 @@ void TDEHTMLPart::findText()
   // Now show the dialog in which the user can choose options.
   d->m_findDialog = new KFindDialog( false /*non-modal*/, widget(), "tdehtmlfind" );
   d->m_findDialog->setHasSelection( hasSelection() );
-  d->m_findDialog->setHasCursor( d->m_findNode != 0 );
+  d->m_findDialog->setHasCursor( d->m_findNode != nullptr );
   if ( d->m_findNode ) // has a cursor -> default to 'FromCursor'
     d->m_lastFindState.options |= KFindDialog::FromCursor;
 
@@ -3118,10 +3118,10 @@ bool TDEHTMLPart::findTextNext( bool reverse )
     tqSwap( d->m_findPosEnd, d->m_findPosStart );
     tqSwap( d->m_findNode, d->m_findNodePrevious );
     // d->m_findNode now point at the end of the last searched line - advance one node
-    tdehtml::RenderObject* obj = d->m_findNode ? d->m_findNode->renderer() : 0;
-    tdehtml::RenderObject* end = d->m_findNodeEnd ? d->m_findNodeEnd->renderer() : 0;
+    tdehtml::RenderObject* obj = d->m_findNode ? d->m_findNode->renderer() : nullptr;
+    tdehtml::RenderObject* end = d->m_findNodeEnd ? d->m_findNodeEnd->renderer() : nullptr;
     if ( obj == end )
-      obj = 0L;
+      obj = nullptr;
     else if ( obj )
     {
       do {
@@ -3131,14 +3131,14 @@ bool TDEHTMLPart::findTextNext( bool reverse )
     if ( obj )
       d->m_findNode = obj->element();
     else
-      d->m_findNode = 0;
+      d->m_findNode = nullptr;
   }
   d->m_lastFindState.last_dir = ( options & KFindDialog::FindBackwards ) ? 1 : 0;
 
   KFind::Result res = KFind::NoMatch;
-  tdehtml::RenderObject* obj = d->m_findNode ? d->m_findNode->renderer() : 0;
-  tdehtml::RenderObject* end = d->m_findNodeEnd ? d->m_findNodeEnd->renderer() : 0;
-  tdehtml::RenderTextArea *tmpTextArea=0L;
+  tdehtml::RenderObject* obj = d->m_findNode ? d->m_findNode->renderer() : nullptr;
+  tdehtml::RenderObject* end = d->m_findNodeEnd ? d->m_findNodeEnd->renderer() : nullptr;
+  tdehtml::RenderTextArea *tmpTextArea=nullptr;
   //kdDebug(6050) << k_funcinfo << "obj=" << obj << " end=" << end << endl;
   while( res == KFind::NoMatch )
   {
@@ -3234,7 +3234,7 @@ bool TDEHTMLPart::findTextNext( bool reverse )
         }
         // Compare obj and end _after_ we processed the 'end' node itself
         if ( obj == end )
-          obj = 0L;
+          obj = nullptr;
         else
         {
           // Move on to next object (note: if we found a \n already, then obj (and lastNode)
@@ -3249,7 +3249,7 @@ bool TDEHTMLPart::findTextNext( bool reverse )
         if ( obj )
           lastNode = obj->element();
         else
-          lastNode = 0;
+          lastNode = nullptr;
       } // end while
       //kdDebug()<<" str : "<<str<<endl;
       if ( !str.isEmpty() )
@@ -3313,8 +3313,8 @@ void TDEHTMLPart::slotHighlight( const TQString& /*text*/, int index, int length
   d->m_startOffset = index - (*prev).index;
 
   tdehtml::RenderObject* obj = node->renderer();
-  tdehtml::RenderTextArea *parent = 0L;
-  tdehtml::RenderLineEdit *parentLine = 0L;
+  tdehtml::RenderTextArea *parent = nullptr;
+  tdehtml::RenderLineEdit *parentLine = nullptr;
   bool renderLineText =false;
 
   TQRect highlightedRect;
@@ -3680,7 +3680,7 @@ void TDEHTMLPart::setSelection( const DOM::Range &r )
                                d->m_selectionEnd.handle(),d->m_endOffset);
 #ifndef TDEHTML_NO_CARET
         bool v = d->m_view->placeCaret();
-        emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset());
+        emitCaretPositionChanged(v ? d->caretNode() : nullptr, d->caretOffset());
 #endif
     }
 }
@@ -3703,7 +3703,7 @@ void TDEHTMLPart::slotClearSelection()
       emitSelectionChanged();
 #ifndef TDEHTML_NO_CARET
     bool v = d->m_view->placeCaret();
-    emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset());
+    emitCaretPositionChanged(v ? d->caretNode() : nullptr, d->caretOffset());
 #endif
 }
 
@@ -3715,7 +3715,7 @@ void TDEHTMLPart::resetHoverText()
      emit onURL( TQString() );
      // revert to default statusbar text
      setStatusBarText(TQString(), BarHoverText);
-     emit d->m_extension->mouseOverInfo(0);
+     emit d->m_extension->mouseOverInfo(nullptr);
   }
 }
 
@@ -3949,7 +3949,7 @@ bool TDEHTMLPart::urlSelectedIntern( const TQString &url, int button, int state,
   args.frameName = target;
 
   args.metaData().insert("main_frame_request",
-                         parentPart() == 0 ? "TRUE":"FALSE");
+                         parentPart() ? "FALSE":"TRUE");
   args.metaData().insert("ssl_parent_ip", d->m_ssl_parent_ip);
   args.metaData().insert("ssl_parent_cert", d->m_ssl_parent_cert);
   args.metaData().insert("PropagateHttpHeader", "true");
@@ -3982,7 +3982,7 @@ bool TDEHTMLPart::urlSelectedIntern( const TQString &url, int button, int state,
   {
     KParts::WindowArgs winArgs;
     winArgs.lowerWindow = true;
-    KParts::ReadOnlyPart *newPart = 0;
+    KParts::ReadOnlyPart *newPart = nullptr;
     emit d->m_extension->createNewWindow( cURL, args, winArgs, newPart );
     return true;
   }
@@ -4035,7 +4035,7 @@ void TDEHTMLPart::slotViewDocumentSource()
 
 void TDEHTMLPart::slotViewPageInfo()
 {
-  TDEHTMLInfoDlg *dlg = new TDEHTMLInfoDlg(NULL, "TDEHTML Page Info Dialog", false, (WFlags)WDestructiveClose);
+  TDEHTMLInfoDlg *dlg = new TDEHTMLInfoDlg(nullptr, "TDEHTML Page Info Dialog", false, (WFlags)WDestructiveClose);
   dlg->_close->setGuiItem(KStdGuiItem::close());
 
   if (d->m_doc)
@@ -4260,7 +4260,7 @@ void TDEHTMLPart::updateActions()
   else
     d->m_paFind->setText( i18n( "&Find..." ) );
 
-  KParts::Part *frame = 0;
+  KParts::Part *frame = nullptr;
 
   if ( frames )
     frame = currentFrame();
@@ -4293,7 +4293,7 @@ void TDEHTMLPart::updateActions()
   d->m_paSaveBackground->setEnabled( !bgURL.isEmpty() );
 
   if ( d->m_paDebugScript )
-    d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : 0L );
+    d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : nullptr );
 }
 
 KParts::LiveConnectExtension *TDEHTMLPart::liveConnectExtension( const tdehtml::RenderPart *frame) const {
@@ -4301,7 +4301,7 @@ KParts::LiveConnectExtension *TDEHTMLPart::liveConnectExtension( const tdehtml::
     for(ConstFrameIt it = d->m_objects.begin(); it != end; ++it )
         if ((*it)->m_frame == frame)
             return (*it)->m_liveconnect;
-    return 0L;
+    return nullptr;
 }
 
 bool TDEHTMLPart::requestFrame( tdehtml::RenderPart *frame, const TQString &url, const TQString &frameName,
@@ -4403,7 +4403,7 @@ bool TDEHTMLPart::requestObject( tdehtml::ChildFrame *child, const KURL &url, co
   child->m_args.metaData().insert("ssl_parent_ip", d->m_ssl_parent_ip);
   child->m_args.metaData().insert("ssl_parent_cert", d->m_ssl_parent_cert);
   child->m_args.metaData().insert("main_frame_request",
-                                  parentPart() == 0 ? "TRUE":"FALSE");
+                                  parentPart() ? "FALSE":"TRUE");
   child->m_args.metaData().insert("ssl_was_in_use",
                                   d->m_ssl_in_use ? "TRUE":"FALSE");
   child->m_args.metaData().insert("ssl_activate_warnings", "TRUE");
@@ -4495,7 +4495,7 @@ bool TDEHTMLPart::processObjectRequest( tdehtml::ChildFrame *child, const KURL &
       delete (KParts::ReadOnlyPart *)child->m_part;
       if (child->m_liveconnect) {
         disconnect(child->m_liveconnect, TQ_SIGNAL(partEvent(const unsigned long, const TQString &, const KParts::LiveConnectExtension::ArgList &)), child, TQ_SLOT(liveConnectEvent(const unsigned long, const TQString&, const KParts::LiveConnectExtension::ArgList &)));
-        child->m_liveconnect = 0L;
+        child->m_liveconnect = nullptr;
       }
     }
 
@@ -4660,11 +4660,11 @@ KParts::ReadOnlyPart *TDEHTMLPart::createPart( TQWidget *parentWidget, const cha
   if ( offers.isEmpty() ) {
     int pos = mimetype.find( "-plugin" );
     if (pos < 0)
-        return 0L;
+        return nullptr;
     TQString stripped_mime = mimetype.left( pos );
     offers = TDETrader::self()->query( stripped_mime, "KParts/ReadOnlyPart", constr, TQString() );
     if ( offers.isEmpty() )
-        return 0L;
+        return nullptr;
   }
 
   TDETrader::OfferList::ConstIterator it = offers.begin();
@@ -4675,7 +4675,7 @@ KParts::ReadOnlyPart *TDEHTMLPart::createPart( TQWidget *parentWidget, const cha
 
     KLibFactory* const factory = KLibLoader::self()->factory( TQFile::encodeName(service->library()) );
     if ( factory ) {
-      KParts::ReadOnlyPart *res = 0L;
+      KParts::ReadOnlyPart *res = nullptr;
 
       const char *className = "KParts::ReadOnlyPart";
       if ( service->serviceTypes().contains( "Browser/View" ) )
@@ -4697,7 +4697,7 @@ KParts::ReadOnlyPart *TDEHTMLPart::createPart( TQWidget *parentWidget, const cha
                       .arg(service->name()).arg(KLibLoader::self()->lastErrorMessage())) << endl;
     }
   }
-  return 0;
+  return nullptr;
 }
 
 KParts::PartManager *TDEHTMLPart::partManager()
@@ -4722,7 +4722,7 @@ void TDEHTMLPart::submitFormAgain()
     TDEHTMLPart::submitForm( d->m_submitForm->submitAction, d->m_submitForm->submitUrl, d->m_submitForm->submitFormData, d->m_submitForm->target, d->m_submitForm->submitContentType, d->m_submitForm->submitBoundary );
 
   delete d->m_submitForm;
-  d->m_submitForm = 0;
+  d->m_submitForm = nullptr;
 }
 
 void TDEHTMLPart::submitFormProxy( const char *action, const TQString &url, const TQByteArray &formData, const TQString &_target, const TQString& contentType, const TQString& boundary )
@@ -4763,7 +4763,7 @@ void TDEHTMLPart::submitForm( const char *action, const TQString &url, const TQB
   if (!d->m_submitForm) {
     if (u.protocol() != "https" && u.protocol() != "mailto") {
       if (d->m_ssl_in_use) {    // Going from SSL -> nonSSL
-        int rc = KMessageBox::warningContinueCancel(NULL, i18n("Warning:  This is a secure form but it is attempting to send your data back unencrypted."
+        int rc = KMessageBox::warningContinueCancel(nullptr, i18n("Warning:  This is a secure form but it is attempting to send your data back unencrypted."
                                                                "\nA third party may be able to intercept and view this information."
                                                                "\nAre you sure you wish to continue?"),
                                                     i18n("Network Transmission"),KGuiItem(i18n("&Send Unencrypted")));
@@ -4772,7 +4772,7 @@ void TDEHTMLPart::submitForm( const char *action, const TQString &url, const TQB
       } else {                  // Going from nonSSL -> nonSSL
         KSSLSettings kss(true);
         if (kss.warnOnUnencrypted()) {
-          int rc = KMessageBox::warningContinueCancel(NULL,
+          int rc = KMessageBox::warningContinueCancel(nullptr,
                                                       i18n("Warning: Your data is about to be transmitted across the network unencrypted."
                                                            "\nAre you sure you wish to continue?"),
                                                       i18n("Network Transmission"),
@@ -4796,7 +4796,7 @@ void TDEHTMLPart::submitForm( const char *action, const TQString &url, const TQB
     }
 
     if (u.protocol() == "mailto") {
-      int rc = KMessageBox::warningContinueCancel(NULL,
+      int rc = KMessageBox::warningContinueCancel(nullptr,
                                                   i18n("This site is attempting to submit form data via email.\n"
                                                        "Do you want to continue?"),
                                                   i18n("Network Transmission"),
@@ -4834,7 +4834,7 @@ void TDEHTMLPart::submitForm( const char *action, const TQString &url, const TQB
   args.metaData().insert("ssl_parent_ip", d->m_ssl_parent_ip);
   args.metaData().insert("ssl_parent_cert", d->m_ssl_parent_cert);
   args.metaData().insert("main_frame_request",
-                         parentPart() == 0 ? "TRUE":"FALSE");
+                         parentPart() ? "FALSE":"TRUE");
   args.metaData().insert("ssl_was_in_use", d->m_ssl_in_use ? "TRUE":"FALSE");
   args.metaData().insert("ssl_activate_warnings", "TRUE");
 //WABA: When we post a form we should treat it as the main url
@@ -4870,7 +4870,7 @@ void TDEHTMLPart::submitForm( const char *action, const TQString &url, const TQB
       }
 
       if (triedToAttach)
-         KMessageBox::information(NULL, i18n("This site attempted to attach a file from your computer in the form submission. The attachment was removed for your protection."), i18n("TDE"), "WarnTriedAttach");
+         KMessageBox::information(nullptr, i18n("This site attempted to attach a file from your computer in the form submission. The attachment was removed for your protection."), i18n("TDE"), "WarnTriedAttach");
 
       // 2)  Append body=
       TQString bodyEnc;
@@ -5172,7 +5172,7 @@ tdehtml::ChildFrame *TDEHTMLPart::frame( const TQObject *obj )
       if ( (KParts::ReadOnlyPart *)(*oi)->m_part == part )
         return *oi;
 
-    return 0L;
+    return nullptr;
 }
 
 //#define DEBUG_FINDFRAME
@@ -5221,7 +5221,7 @@ TDEHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString
   TDEHTMLPart* const callingHtmlPart = dynamic_cast<TDEHTMLPart *>(callingPart);
 
   if (!checkFrameAccess(callingHtmlPart))
-     return 0;
+     return nullptr;
 
   // match encoding used in KonqView::setViewName()
   if (!childFrame && !parentPart() && (TQString::fromLocal8Bit(name()) == f))
@@ -5250,7 +5250,7 @@ TDEHTMLPart::findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString
          return frameParent;
     }
   }
-  return 0;
+  return nullptr;
 }
 
 
@@ -5264,13 +5264,13 @@ TDEHTMLPart *TDEHTMLPart::findFrame( const TQString &f )
      if ( p && p->inherits( "TDEHTMLPart" ))
         return static_cast<TDEHTMLPart *>(p);
   }
-  return 0;
+  return nullptr;
 }
 
 KParts::ReadOnlyPart *TDEHTMLPart::findFramePart(const TQString &f)
 {
   tdehtml::ChildFrame *childFrame;
-  return findFrameParent(this, f, &childFrame) ? static_cast<KParts::ReadOnlyPart *>(childFrame->m_part) : 0L;
+  return findFrameParent(this, f, &childFrame) ? static_cast<KParts::ReadOnlyPart *>(childFrame->m_part) : nullptr;
 }
 
 KParts::ReadOnlyPart *TDEHTMLPart::currentFrame() const
@@ -5315,7 +5315,7 @@ KJSProxy *TDEHTMLPart::framejScript(KParts::ReadOnlyPart *framePart)
         createJScript(*it);
       return (*it)->m_jscript;
     }
-  return 0L;
+  return nullptr;
 }
 
 TDEHTMLPart *TDEHTMLPart::parentPart()
@@ -5337,7 +5337,7 @@ tdehtml::ChildFrame *TDEHTMLPart::recursiveFrameRequest( TDEHTMLPart *callingHtm
         return childFrame;
 
      childPart->requestObject( childFrame, url, args );
-     return 0;
+     return nullptr;
   }
 
   if ( parentPart() && callParent )
@@ -5348,7 +5348,7 @@ tdehtml::ChildFrame *TDEHTMLPart::recursiveFrameRequest( TDEHTMLPart *callingHtm
        parentPart()->requestObject( res, url, args );
   }
 
-  return 0L;
+  return nullptr;
 }
 
 #ifndef NDEBUG
@@ -6075,7 +6075,7 @@ void TDEHTMLPart::tdehtmlMousePressEvent( tdehtml::MousePressEvent *event )
 	  return;
       if ( !innerNode.isNull()  && innerNode.handle()->renderer()) {
           int offset = 0;
-          DOM::NodeImpl* node = 0;
+          DOM::NodeImpl* node = nullptr;
           tdehtml::RenderObject::SelPointState state;
           innerNode.handle()->renderer()->checkSelectionPoint( event->x(), event->y(),
                                                                event->absX()-innerNode.handle()->renderer()->xPos(),
@@ -6116,7 +6116,7 @@ void TDEHTMLPart::tdehtmlMousePressEvent( tdehtml::MousePressEvent *event )
 #endif
   }
 
-  if ( _mouse->button() == TQt::RightButton && parentPart() != 0 && d->m_bBackRightClick )
+  if ( _mouse->button() == TQt::RightButton && parentPart() && d->m_bBackRightClick )
   {
     d->m_bRightMousePressed = true;
   } else if ( _mouse->button() == TQt::RightButton )
@@ -6136,7 +6136,7 @@ void TDEHTMLPart::tdehtmlMouseDoubleClickEvent( tdehtml::MouseDoubleClickEvent *
     // Find selectionStart again, tdehtmlMouseReleaseEvent lost it
     if ( !innerNode.isNull() && innerNode.handle()->renderer()) {
       int offset = 0;
-      DOM::NodeImpl* node = 0;
+      DOM::NodeImpl* node = nullptr;
       tdehtml::RenderObject::SelPointState state;
       innerNode.handle()->renderer()->checkSelectionPoint( event->x(), event->y(),
                                                            event->absX()-innerNode.handle()->renderer()->xPos(),
@@ -6182,7 +6182,7 @@ void TDEHTMLPart::tdehtmlMouseDoubleClickEvent( tdehtml::MouseDoubleClickEvent *
                          d->m_selectionEnd.handle(),d->m_endOffset);
 #ifndef TDEHTML_NO_CARET
         bool v = d->m_view->placeCaret();
-        emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset());
+        emitCaretPositionChanged(v ? d->caretNode() : nullptr, d->caretOffset());
 #endif
         startAutoScroll();
       }
@@ -6199,7 +6199,7 @@ void TDEHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node&
     tdehtml::RenderText *renderer = static_cast<tdehtml::RenderText *>(obj);
     tdehtml::InlineTextBox *run = renderer->findInlineTextBox( offset, pos );
     DOMString t = node->nodeValue();
-    DOM::NodeImpl* selNode = 0;
+    DOM::NodeImpl* selNode = nullptr;
     long selOfs = 0;
 
     if (!run)
@@ -6259,7 +6259,7 @@ void TDEHTMLPart::extendSelection( DOM::NodeImpl* node, long offset, DOM::Node&
         else if ( obj->isBR() )
           str = '\n';
         else if ( !obj->isInline() ) {
-          obj = 0L; // parag limit -> done
+          obj = nullptr; // parag limit -> done
           break;
         }
         len = str.length();
@@ -6299,7 +6299,7 @@ void TDEHTMLPart::extendSelectionTo(int x, int y, int absX, int absY, const DOM:
 {
       int offset;
       //kdDebug(6000) << "TDEHTMLPart::tdehtmlMouseMoveEvent x=" << event->x() << " y=" << event->y() << endl;
-      DOM::NodeImpl* node=0;
+      DOM::NodeImpl* node=nullptr;
       tdehtml::RenderObject::SelPointState state;
       innerNode.handle()->renderer()->checkSelectionPoint( x, y,
                                                            absX-innerNode.handle()->renderer()->xPos(),
@@ -6380,7 +6380,7 @@ void TDEHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event )
 {
   TQMouseEvent *_mouse = event->qmouseEvent();
 
-  if( d->m_bRightMousePressed && parentPart() != 0 && d->m_bBackRightClick )
+  if( d->m_bRightMousePressed && parentPart() && d->m_bBackRightClick )
   {
     popupMenu( d->m_strSelectedURL );
     d->m_strSelectedURL = d->m_strSelectedURLTarget = TQString();
@@ -6399,8 +6399,8 @@ void TDEHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event )
       return;
 
     TQPixmap pix;
-    HTMLImageElementImpl *img = 0L;
-    TQDragObject *drag = 0;
+    HTMLImageElementImpl *img = nullptr;
+    TQDragObject *drag = nullptr;
     KURL u;
 
     // tqDebug("****************** Event URL: %s", url.string().latin1());
@@ -6422,13 +6422,13 @@ void TDEHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event )
 
     u.setPass(TQString());
 
-    KURLDrag* urlDrag = new KURLDrag( u, img ? 0 : d->m_view->viewport() );
+    KURLDrag* urlDrag = new KURLDrag( u, img ? nullptr : d->m_view->viewport() );
     if ( !d->m_referrer.isEmpty() )
       urlDrag->metaData()["referrer"] = d->m_referrer;
 
     if( img && img->complete()) {
       KMultipleDrag *mdrag = new KMultipleDrag( d->m_view->viewport() );
-      mdrag->addDragObject( new TQImageDrag( img->currentImage(), 0L ) );
+      mdrag->addDragObject( new TQImageDrag( img->currentImage(), nullptr ) );
       mdrag->addDragObject( urlDrag );
       drag = mdrag;
     }
@@ -6530,7 +6530,7 @@ void TDEHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event )
   d->m_bMousePressed = false;
 
   TQMouseEvent *_mouse = event->qmouseEvent();
-  if ( _mouse->button() == TQt::RightButton && parentPart() != 0 && d->m_bBackRightClick )
+  if ( _mouse->button() == TQt::RightButton && parentPart() && d->m_bBackRightClick )
   {
     d->m_bRightMousePressed = false;
     KParts::BrowserInterface *tmp_iface = d->m_extension->browserInterface();
@@ -6609,7 +6609,7 @@ void TDEHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event )
     }
 #ifndef TDEHTML_NO_CARET
     bool v = d->m_view->placeCaret();
-    emitCaretPositionChanged(v ? d->caretNode() : 0, d->caretOffset());
+    emitCaretPositionChanged(v ? d->caretNode() : nullptr, d->caretOffset());
 #endif
     // get selected text and paste to the clipboard
 #ifndef TQT_NO_CLIPBOARD
@@ -6624,7 +6624,7 @@ void TDEHTMLPart::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent *event )
 //kdDebug(6000) << "rel2: startBefEnd " << d->m_startBeforeEnd << " extAtEnd " << d->m_extendAtEnd << " (" << d->m_startOffset << ") - (" << d->m_endOffset << "), caretOfs " << d->caretOffset() << endl;
   }
 #endif
-  d->m_initialNode = 0;		// don't hold nodes longer than necessary
+  d->m_initialNode = nullptr;		// don't hold nodes longer than necessary
   d->m_initialOffset = 0;
 
 }
@@ -6638,7 +6638,7 @@ void TDEHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event )
   if ( event->activated() )
   {
     emitSelectionChanged();
-    emit d->m_extension->enableAction( "print", d->m_doc != 0 );
+    emit d->m_extension->enableAction( "print", d->m_doc != nullptr );
 
     if ( !d->m_settings->autoLoadImages() && d->m_paLoadImages )
     {
@@ -6829,14 +6829,14 @@ bool TDEHTMLPart::checkLinkSecurity(const KURL &linkURL,const TQString &message,
     int response = KMessageBox::Cancel;
     if (!message.isEmpty())
     {
-	    response = KMessageBox::warningContinueCancel( 0,
+	    response = KMessageBox::warningContinueCancel( nullptr,
 							   message.arg(linkURL.htmlURL()),
 							   i18n( "Security Warning" ),
 							   button);
     }
     else
     {
-	    KMessageBox::error( 0,
+	    KMessageBox::error( nullptr,
 				i18n( "<qt>Access by untrusted page to<BR><B>%1</B><BR> denied.").arg(linkURL.htmlURL()),
 				i18n( "Security Alert" ));
     }
@@ -6853,7 +6853,7 @@ void TDEHTMLPart::slotPartRemoved( KParts::Part *part )
 //    kdDebug(6050) << "TDEHTMLPart::slotPartRemoved " << part << endl;
     if ( part == d->m_activeFrame )
     {
-        d->m_activeFrame = 0L;
+        d->m_activeFrame = nullptr;
         if ( !part->inherits( "TDEHTMLPart" ) )
         {
             if (factory()) {
@@ -6937,7 +6937,7 @@ void TDEHTMLPart::setActiveNode(const DOM::Node &node)
 
 DOM::Node TDEHTMLPart::activeNode() const
 {
-    return DOM::Node(d->m_doc?d->m_doc->focusNode():0);
+    return DOM::Node(d->m_doc?d->m_doc->focusNode():nullptr);
 }
 
 DOM::EventListener *TDEHTMLPart::createHTMLEventListener( TQString code, TQString name, NodeImpl* node )
@@ -6945,7 +6945,7 @@ DOM::EventListener *TDEHTMLPart::createHTMLEventListener( TQString code, TQStrin
   KJSProxy *proxy = jScript();
 
   if (!proxy)
-    return 0;
+    return nullptr;
 
   return proxy->createHTMLEventHandler( m_url.url(), name, code, node );
 }
@@ -7156,7 +7156,7 @@ void TDEHTMLPart::openWallet(DOM::HTMLFormElementImpl *form)
         return;
       }
       d->m_wallet->deleteLater();
-      d->m_wallet = 0L;
+      d->m_wallet = nullptr;
       d->m_bWalletOpened = false;
     }
   }
@@ -7198,7 +7198,7 @@ void TDEHTMLPart::saveToWallet(const TQString& key, const TQMap<TQString,TQStrin
         return;
       }
       d->m_wallet->deleteLater();
-      d->m_wallet = 0L;
+      d->m_wallet = nullptr;
       d->m_bWalletOpened = false;
     }
   }
@@ -7240,7 +7240,7 @@ void TDEHTMLPart::walletOpened(TDEWallet::Wallet *wallet) {
   assert(d->m_wq);
 
   d->m_wq->deleteLater(); // safe?
-  d->m_wq = 0L;
+  d->m_wq = nullptr;
 
   if (!wallet) {
     d->m_bWalletOpened = false;
@@ -7289,13 +7289,13 @@ void TDEHTMLPart::slotWalletClosed()
 #ifndef TDEHTML_NO_WALLET
   if (d->m_wallet) {
     d->m_wallet->deleteLater();
-    d->m_wallet = 0L;
+    d->m_wallet = nullptr;
   }
   d->m_bWalletOpened = false;
   if (d->m_statusBarWalletLabel) {
     d->m_statusBarExtension->removeStatusBarItem(d->m_statusBarWalletLabel);
     delete d->m_statusBarWalletLabel;
-    d->m_statusBarWalletLabel = 0L;
+    d->m_statusBarWalletLabel = nullptr;
   }
 #endif // TDEHTML_NO_WALLET
 }
@@ -7316,7 +7316,7 @@ void TDEHTMLPart::launchWalletManager()
 void TDEHTMLPart::walletMenu()
 {
 #ifndef TDEHTML_NO_WALLET
-  TDEPopupMenu *m = new TDEPopupMenu(0L);
+  TDEPopupMenu *m = new TDEPopupMenu(nullptr);
   m->insertItem(i18n("&Close Wallet"), this, TQ_SLOT(slotWalletClosed()));
   m->popup(TQCursor::pos());
 #endif // TDEHTML_NO_WALLET
@@ -7362,7 +7362,7 @@ void TDEHTMLPart::setDebugScript( bool enable )
     if (!d->m_paDebugScript) {
       d->m_paDebugScript = new TDEAction( i18n( "JavaScript &Debugger" ), 0, this, TQ_SLOT( slotDebugScript() ), actionCollection(), "debugScript" );
     }
-    d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : 0L );
+    d->m_paDebugScript->setEnabled( d->m_frame ? d->m_frame->m_jscript : nullptr );
     TQPtrList<TDEAction> lst;
     lst.append( d->m_paDebugScript );
     plugActionList( "debugScriptList", lst );
@@ -7372,7 +7372,7 @@ void TDEHTMLPart::setDebugScript( bool enable )
 
 void TDEHTMLPart::setSuppressedPopupIndicator( bool enable )
 {
-    setSuppressedPopupIndicator( enable, 0 );
+    setSuppressedPopupIndicator( enable, nullptr );
 }
 
 void TDEHTMLPart::setSuppressedPopupIndicator( bool enable, TDEHTMLPart *originPart )
@@ -7407,12 +7407,12 @@ void TDEHTMLPart::setSuppressedPopupIndicator( bool enable, TDEHTMLPart *originP
         TQToolTip::remove( d->m_statusBarPopupLabel );
         d->m_statusBarExtension->removeStatusBarItem( d->m_statusBarPopupLabel );
         delete d->m_statusBarPopupLabel;
-        d->m_statusBarPopupLabel = 0L;
+        d->m_statusBarPopupLabel = nullptr;
     }
 }
 
 void TDEHTMLPart::suppressedPopupMenu() {
-  TDEPopupMenu *m = new TDEPopupMenu(0L);
+  TDEPopupMenu *m = new TDEPopupMenu(nullptr);
   m->setCheckable(true);
   if ( d->m_openableSuppressedPopups )
       m->insertItem(i18n("&Show Blocked Popup Window","Show %n Blocked Popup Windows", d->m_openableSuppressedPopups), this, TQ_SLOT(showSuppressedPopups()));
diff --git a/tdehtml/tdehtml_part.h b/tdehtml/tdehtml_part.h
index a67cb28ab..4011afc84 100644
--- a/tdehtml/tdehtml_part.h
+++ b/tdehtml/tdehtml_part.h
@@ -245,10 +245,10 @@ public:
    * @p parentWidget is used as parent for both objects, the part and
    * the view.
    */
-  TDEHTMLPart( TQWidget *parentWidget = 0, const char *widgetname = 0,
-             TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+  TDEHTMLPart( TQWidget *parentWidget = nullptr, const char *widgetname = nullptr,
+             TQObject *parent = nullptr, const char *name = nullptr, GUIProfile prof = DefaultGUI );
 
-  TDEHTMLPart( TDEHTMLView *view, TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+  TDEHTMLPart( TDEHTMLView *view, TQObject *parent = nullptr, const char *name = nullptr, GUIProfile prof = DefaultGUI );
 
   /**
    * Destructor.
@@ -606,7 +606,7 @@ public:
   /**
    * Paints the HTML page to a TQPainter. See TDEHTMLView::paint for details
    */
-  void paint( TQPainter *, const TQRect &, int = 0, bool * = 0 );
+  void paint( TQPainter *, const TQRect &, int = 0, bool * = nullptr );
 
   /**
    * Sets the encoding the page uses.
@@ -721,8 +721,8 @@ public:
    * @param findDialog Optionally, you can supply your own dialog.
    * @since 3.3
    */
-  void findText( const TQString &str, long options, TQWidget *parent = 0,
-                 KFindDialog *findDialog = 0 );
+  void findText( const TQString &str, long options, TQWidget *parent = nullptr,
+                 KFindDialog *findDialog = nullptr );
 
   /**
    * Initiates a text search.
@@ -915,7 +915,7 @@ public:
    * frame info in @p *childFrame
    * @since 3.3
    */
-  TDEHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, tdehtml::ChildFrame **childFrame=0 );
+  TDEHTMLPart *findFrameParent( KParts::ReadOnlyPart *callingPart, const TQString &f, tdehtml::ChildFrame **childFrame=nullptr );
 
   /**
    * Return the current frame (the one that has focus)
diff --git a/tdehtml/tdehtml_printsettings.h b/tdehtml/tdehtml_printsettings.h
index 1e1250824..8294c177f 100644
--- a/tdehtml/tdehtml_printsettings.h
+++ b/tdehtml/tdehtml_printsettings.h
@@ -28,7 +28,7 @@ class TDEHTMLPrintSettings : public KPrintDialogPage
 {
 	TQ_OBJECT
 public:
-	TDEHTMLPrintSettings(TQWidget *parent = 0, const char *name = 0);
+	TDEHTMLPrintSettings(TQWidget *parent = nullptr, const char *name = nullptr);
 	~TDEHTMLPrintSettings();
 
 	void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
diff --git a/tdehtml/tdehtml_run.cpp b/tdehtml/tdehtml_run.cpp
index b04caa7d1..2a382d825 100644
--- a/tdehtml/tdehtml_run.cpp
+++ b/tdehtml/tdehtml_run.cpp
@@ -30,7 +30,7 @@
 
 TDEHTMLRun::TDEHTMLRun( TDEHTMLPart *part, tdehtml::ChildFrame *child, const KURL &url,
                     const KParts::URLArgs &args, bool hideErrorDialog )
-    : KParts::BrowserRun( url, args, part, part->widget() ? part->widget()->topLevelWidget() : 0,
+    : KParts::BrowserRun( url, args, part, part->widget() ? part->widget()->topLevelWidget() : nullptr,
                           false, false, hideErrorDialog ),
   m_child( child )
 {
@@ -38,7 +38,7 @@ TDEHTMLRun::TDEHTMLRun( TDEHTMLPart *part, tdehtml::ChildFrame *child, const KUR
     setEnableExternalBrowser(false);
 
     // get the wheel to start spinning
-    part->started(0L);
+    part->started(nullptr);
 }
 
 //TDEHTMLPart *TDEHTMLRun::htmlPart() const
diff --git a/tdehtml/tdehtml_settings.cpp b/tdehtml/tdehtml_settings.cpp
index 2e4c5dcb6..a31ddaec4 100644
--- a/tdehtml/tdehtml_settings.cpp
+++ b/tdehtml/tdehtml_settings.cpp
@@ -151,9 +151,9 @@ const char* TDEHTMLSettings::adviceToStr(KJavaScriptAdvice _advice)
     switch( _advice ) {
     case KJavaScriptAccept: return I18N_NOOP("Accept");
     case KJavaScriptReject: return I18N_NOOP("Reject");
-    default: return 0;
+    default: return nullptr;
     }
-        return 0;
+        return nullptr;
 }
 
 
@@ -774,7 +774,7 @@ void TDEHTMLSettings::addAdFilter( const TQString &url )
     }
     else
     {
-        KMessageBox::error(0,
+        KMessageBox::error(nullptr,
                            rx.errorString(),
                            i18n("Filter error"));
     }
diff --git a/tdehtml/tdehtmlimage.cpp b/tdehtml/tdehtmlimage.cpp
index 2f1ea699b..3359aa373 100644
--- a/tdehtml/tdehtmlimage.cpp
+++ b/tdehtml/tdehtmlimage.cpp
@@ -36,7 +36,7 @@
 
 K_EXPORT_COMPONENT_FACTORY( tdehtmlimagefactory /*NOT the part name, see Makefile.am*/, TDEHTMLImageFactory )
 
-TDEInstance *TDEHTMLImageFactory::s_instance = 0;
+TDEInstance *TDEHTMLImageFactory::s_instance = nullptr;
 
 TDEHTMLImageFactory::TDEHTMLImageFactory()
 {
@@ -60,7 +60,7 @@ KParts::Part *TDEHTMLImageFactory::createPartObject( TQWidget *parentWidget, con
 
 TDEHTMLImage::TDEHTMLImage( TQWidget *parentWidget, const char *widgetName,
                         TQObject *parent, const char *name, TDEHTMLPart::GUIProfile prof )
-    : KParts::ReadOnlyPart( parent, name ), m_image( 0 )
+    : KParts::ReadOnlyPart( parent, name ), m_image( nullptr )
 {
     TDEHTMLPart* parentPart = ::tqt_cast<TDEHTMLPart *>( parent );
     setInstance( TDEHTMLImageFactory::instance(), prof == TDEHTMLPart::BrowserViewGUI && !parentPart );
@@ -141,7 +141,7 @@ bool TDEHTMLImage::openURL( const KURL &url )
 
     m_url = url;
 
-    emit started( 0 );
+    emit started( nullptr );
 
     KParts::URLArgs args = m_ext->urlArgs();
     m_mimeType = args.serviceType;
@@ -293,7 +293,7 @@ void TDEHTMLImage::disposeImage()
         return;
 
     m_image->deref( this );
-    m_image = 0;
+    m_image = nullptr;
 }
 
 bool TDEHTMLImage::eventFilter(TQObject *, TQEvent *e) {
diff --git a/tdehtml/tdehtmlimage.h b/tdehtml/tdehtmlimage.h
index 6fd3fd928..0299c4c6b 100644
--- a/tdehtml/tdehtmlimage.h
+++ b/tdehtml/tdehtmlimage.h
@@ -102,7 +102,7 @@ class TDEHTMLImageBrowserExtension : public KParts::BrowserExtension
 {
     TQ_OBJECT
 public:
-    TDEHTMLImageBrowserExtension( TDEHTMLImage *parent, const char *name = 0 );
+    TDEHTMLImageBrowserExtension( TDEHTMLImage *parent, const char *name = nullptr );
 
     virtual int xOffset();
     virtual int yOffset();
diff --git a/tdehtml/tdehtmlpart_p.h b/tdehtml/tdehtmlpart_p.h
index 53d0fd4b6..923a6b59b 100644
--- a/tdehtml/tdehtmlpart_p.h
+++ b/tdehtml/tdehtmlpart_p.h
@@ -78,9 +78,9 @@ namespace tdehtml
   public:
       enum Type { Frame, IFrame, Object };
 
-      ChildFrame() : TQObject (0L, "tdehtml_child_frame") {
-          m_jscript = 0L;
-          m_kjs_lib = 0;
+      ChildFrame() : TQObject (nullptr, "tdehtml_child_frame") {
+          m_jscript = nullptr;
+          m_kjs_lib = nullptr;
           m_bCompleted = false; m_bPreloaded = false; m_type = Frame; m_bNotify = false;
           m_bPendingRedirection = false;
       }
@@ -133,14 +133,14 @@ class TDEHTMLWalletQueue : public TQObject
   public:
     TDEHTMLWalletQueue(TQObject *parent) : TQObject(parent) {
 #ifndef TDEHTML_NO_WALLET
-      wallet = 0L;
+      wallet = nullptr;
 #endif // TDEHTML_NO_WALLET
     }
 
     virtual ~TDEHTMLWalletQueue() {
 #ifndef TDEHTML_NO_WALLET
       delete wallet;
-      wallet = 0L;
+      wallet = nullptr;
 #endif // TDEHTML_NO_WALLET
     }
 #ifndef TDEHTML_NO_WALLET
@@ -159,7 +159,7 @@ class TDEHTMLWalletQueue : public TQObject
 #ifndef TDEHTML_NO_WALLET
       if (!success) {
         delete wallet;
-        wallet = 0L;
+        wallet = nullptr;
       }
       emit walletOpened(wallet);
       if (wallet) {
@@ -178,7 +178,7 @@ class TDEHTMLWalletQueue : public TQObject
       }
       callers.clear();
       savers.clear();
-      wallet = 0L; // gave it away
+      wallet = nullptr; // gave it away
 #endif // TDEHTML_NO_WALLET
     }
 };
@@ -190,16 +190,16 @@ class TDEHTMLPartPrivate
 public:
   TDEHTMLPartPrivate(TQObject* parent)
   {
-    m_doc = 0L;
-    m_decoder = 0L;
-    m_wallet = 0L;
+    m_doc = nullptr;
+    m_decoder = nullptr;
+    m_wallet = nullptr;
     m_bWalletOpened = false;
     m_runningScripts = 0;
-    m_job = 0L;
+    m_job = nullptr;
     m_bComplete = true;
     m_bLoadEventEmitted = true;
     m_cachePolicy = TDEIO::CC_Verify;
-    m_manager = 0L;
+    m_manager = nullptr;
     m_settings = new TDEHTMLSettings(*TDEHTMLFactory::defaultHTMLSettings());
     m_bClearing = false;
     m_bCleared = false;
@@ -213,15 +213,15 @@ public:
     m_totalObjectCount = 0;
     m_jobPercent = 0;
     m_haveEncoding = false;
-    m_activeFrame = 0L;
-    m_find = 0;
-    m_findDialog = 0;
+    m_activeFrame = nullptr;
+    m_find = nullptr;
+    m_findDialog = nullptr;
     m_ssl_in_use = false;
-    m_jsedlg = 0;
+    m_jsedlg = nullptr;
     m_formNotification = TDEHTMLPart::NoNotification;
 
 #ifndef TQ_WS_QWS
-    m_javaContext = 0;
+    m_javaContext = nullptr;
 #endif
     m_cacheId = 0;
     m_frameNameId = 1;
@@ -247,7 +247,7 @@ public:
     m_statusMessagesEnabled = true;
 
     m_bFirstData = true;
-    m_submitForm = 0;
+    m_submitForm = nullptr;
     m_delayRedirect = 0;
     m_autoDetectLanguage = tdehtml::Decoder::SemiautomaticDetection;
 
@@ -277,17 +277,17 @@ public:
 
     m_focusNodeNumber = -1;
     m_focusNodeRestored = false;
-    m_opener = 0;
+    m_opener = nullptr;
     m_openedByJS = false;
     m_newJSInterpreterExists = false;
-    m_dcopobject = 0;
+    m_dcopobject = nullptr;
     m_jobspeed = 0;
     m_dcop_counter = ++tdehtml_part_dcop_counter;
-    m_statusBarWalletLabel = 0L;
-    m_statusBarUALabel = 0L;
-    m_statusBarJSErrorLabel = 0L;
+    m_statusBarWalletLabel = nullptr;
+    m_statusBarUALabel = nullptr;
+    m_statusBarJSErrorLabel = nullptr;
     m_userStyleSheetLastModified = 0;
-    m_wq = 0;
+    m_wq = nullptr;
   }
   ~TDEHTMLPartPrivate()
   {
@@ -500,8 +500,8 @@ public:
   {
       // Just basic ref/deref on our node to make sure it doesn't get deleted
       StringPortion( int i, DOM::NodeImpl* n ) : index(i), node(n) { if (node) node->ref(); }
-      StringPortion() : index(0), node(0) {} // for QValueList
-      StringPortion( const StringPortion& other ) : node(0) { operator=(other); }
+      StringPortion() : index(0), node(nullptr) {} // for QValueList
+      StringPortion( const StringPortion& other ) : node(nullptr) { operator=(other); }
       StringPortion& operator=( const StringPortion& other ) {
           index=other.index;
           if (other.node) other.node->ref();
diff --git a/tdehtml/tdehtmlview.cpp b/tdehtml/tdehtmlview.cpp
index d9f5e69a7..4b675f0cd 100644
--- a/tdehtml/tdehtmlview.cpp
+++ b/tdehtml/tdehtmlview.cpp
@@ -150,36 +150,36 @@ public:
     };
 
     TDEHTMLViewPrivate()
-        : underMouse( 0 ), underMouseNonShared( 0 ), visibleWidgets( 107 )
+        : underMouse( nullptr ), underMouseNonShared( nullptr ), visibleWidgets( 107 )
 #ifndef NO_SMOOTH_SCROLL_HACK
           , dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false)
 #endif
     {
 #ifndef TDEHTML_NO_CARET
-	m_caretViewContext = 0;
-	m_editorContext = 0;
+	m_caretViewContext = nullptr;
+	m_editorContext = nullptr;
 #endif // TDEHTML_NO_CARET
-        postponed_autorepeat = NULL;
+        postponed_autorepeat = nullptr;
         reset();
         vmode = TQScrollView::Auto;
  	hmode = TQScrollView::Auto;
-        tp=0;
-        paintBuffer=0;
-        vertPaintBuffer=0;
-        formCompletions=0;
+        tp=nullptr;
+        paintBuffer=nullptr;
+        vertPaintBuffer=nullptr;
+        formCompletions=nullptr;
         prevScrollbarVisible = true;
-	tooltip = 0;
+	tooltip = nullptr;
         possibleTripleClick = false;
         emitCompletedAfterRepaint = CSNone;
-	cursor_icon_widget = NULL;
-        m_mouseScrollTimer = 0;
-        m_mouseScrollIndicator = 0;
+	cursor_icon_widget = nullptr;
+        m_mouseScrollTimer = nullptr;
+        m_mouseScrollIndicator = nullptr;
     }
     ~TDEHTMLViewPrivate()
     {
         delete formCompletions;
-        delete tp; tp = 0;
-        delete paintBuffer; paintBuffer =0;
+        delete tp; tp = nullptr;
+        delete paintBuffer; paintBuffer =nullptr;
         delete vertPaintBuffer;
         delete postponed_autorepeat;
         if (underMouse)
@@ -199,10 +199,10 @@ public:
     {
         if (underMouse)
 	    underMouse->deref();
-	underMouse = 0;
+	underMouse = nullptr;
         if (underMouseNonShared)
 	    underMouseNonShared->deref();
-	underMouseNonShared = 0;
+	underMouseNonShared = nullptr;
         linkPressed = false;
         useSlowRepaints = false;
 	tabMovePending = false;
@@ -236,7 +236,7 @@ public:
 	isDoubleClick = false;
 	scrollingSelf = false;
         delete postponed_autorepeat;
-        postponed_autorepeat = NULL;
+        postponed_autorepeat = nullptr;
 	layoutTimerId = 0;
         repaintTimerId = 0;
         scrollTimerId = 0;
@@ -536,7 +536,7 @@ TDEHTMLView::~TDEHTMLView()
         if (doc)
             doc->detach();
     }
-    delete d; d = 0;
+    delete d; d = nullptr;
 }
 
 void TDEHTMLView::init()
@@ -695,7 +695,7 @@ void TDEHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh )
             if ( !rw->isFrame() && ((g.top() > pt.y()+eh) || (g.bottom() <= pt.y()) ||
                                     (g.right() <= pt.x()) || (g.left() > pt.x()+ew) ))
                 continue;
-            RenderLayer* rl = rw->needsMask() ? rw->enclosingStackingContext() : 0;
+            RenderLayer* rl = rw->needsMask() ? rw->enclosingStackingContext() : nullptr;
             TQRegion mask = rl ? rl->getMask() : TQRegion();
             if (!mask.isNull()) {
                 TQPoint o(0,0);
@@ -808,8 +808,8 @@ void TDEHTMLView::layout()
         d->layoutSchedulingEnabled=false;
 
         // the reference object for the overflow property on canvas
-        RenderObject * ref = 0;
-        RenderObject* root = document->documentElement() ? document->documentElement()->renderer() : 0;
+        RenderObject * ref = nullptr;
+        RenderObject* root = document->documentElement() ? document->documentElement()->renderer() : nullptr;
 
         if (document->isHTMLDocument()) {
              NodeImpl *body = static_cast<HTMLDocumentImpl*>(document)->body();
@@ -985,7 +985,7 @@ void TDEHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
             p.drawPixmap( 32, 16, icon );
             p.drawEllipse( 23, 23, 2, 2 );
 
-            d->m_mouseScrollIndicator = new TQWidget( this, 0 );
+            d->m_mouseScrollIndicator = new TQWidget( this, nullptr );
             d->m_mouseScrollIndicator->setFixedSize( 48, 48 );
             d->m_mouseScrollIndicator->setPaletteBackgroundPixmap( pixmap );
         }
@@ -1032,7 +1032,7 @@ void TDEHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
     }
     else if ( d->m_mouseScrollTimer ) {
         delete d->m_mouseScrollTimer;
-        d->m_mouseScrollTimer = 0;
+        d->m_mouseScrollTimer = nullptr;
 
         if ( d->m_mouseScrollIndicator )
             d->m_mouseScrollIndicator->hide();
@@ -1045,7 +1045,7 @@ void TDEHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
     bool swallowEvent = dispatchMouseEvent(EventImpl::MOUSEDOWN_EVENT,mev.innerNode.handle(),mev.innerNonSharedNode.handle(),true,
                                            d->clickCount,_mouse,true,DOM::NodeImpl::MousePress);
 
-    tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : 0;
+    tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : nullptr;
     if (r && r->isWidget())
 	_mouse->ignore();
 
@@ -1085,7 +1085,7 @@ void TDEHTMLView::viewportMouseDoubleClickEvent( TQMouseEvent *_mouse )
     bool swallowEvent = dispatchMouseEvent(EventImpl::MOUSEDOWN_EVENT,mev.innerNode.handle(),mev.innerNonSharedNode.handle(),true,
                                            d->clickCount,_mouse,true,DOM::NodeImpl::MouseDblClick);
 
-    tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : 0;
+    tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : nullptr;
     if (r && r->isWidget())
 	_mouse->ignore();
 
@@ -1191,8 +1191,8 @@ void TDEHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
         forwardPeripheralEvent(static_cast<tdehtml::RenderWidget*>(fn->renderer()), _mouse, xm, ym);
     }
 
-    tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : 0;
-    tdehtml::RenderStyle* style = (r && r->style()) ? r->style() : 0;
+    tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : nullptr;
+    tdehtml::RenderStyle* style = (r && r->style()) ? r->style() : nullptr;
     TQCursor c;
     bool mailtoCursor = false;
     bool newWindowCursor = false;
@@ -1269,18 +1269,18 @@ void TDEHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
 
     if ( ( mailtoCursor || newWindowCursor ) && isVisible() && hasFocus() ) {
 #ifdef TQ_WS_X11
-        TQPixmap icon_pixmap = TDEGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window-new", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true );
+        TQPixmap icon_pixmap = TDEGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window-new", TDEIcon::Small, 0, TDEIcon::DefaultState, nullptr, true );
 
         if (d->cursor_icon_widget) {
             const TQPixmap *pm = d->cursor_icon_widget->backgroundPixmap();
             if (!pm || pm->serialNumber()!=icon_pixmap.serialNumber()) {
                 delete d->cursor_icon_widget;
-                d->cursor_icon_widget = 0;
+                d->cursor_icon_widget = nullptr;
             }
         }
 
         if( !d->cursor_icon_widget ) {
-            d->cursor_icon_widget = new TQWidget( NULL, NULL, WX11BypassWM );
+            d->cursor_icon_widget = new TQWidget( nullptr, nullptr, WX11BypassWM );
             XSetWindowAttributes attr;
             attr.save_under = True;
             XChangeWindowAttributes( tqt_xdisplay(), d->cursor_icon_widget->winId(), CWSaveUnder, &attr );
@@ -1345,7 +1345,7 @@ void TDEHTMLView::viewportMouseReleaseEvent( TQMouseEvent * _mouse )
             forwardPeripheralEvent(static_cast<tdehtml::RenderWidget*>(fn->renderer()), _mouse, xm, ym);
         }
 
-        tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : 0;
+        tdehtml::RenderObject* r = mev.innerNode.handle() ? mev.innerNode.handle()->renderer() : nullptr;
         if (r && r->isWidget())
             _mouse->ignore();
     }
@@ -1402,7 +1402,7 @@ bool TDEHTMLView::dispatchKeyEvent( TQKeyEvent *_ke )
             if( !ret && d->postponed_autorepeat )
                 keyPressEvent( d->postponed_autorepeat );
             delete d->postponed_autorepeat;
-            d->postponed_autorepeat = NULL;
+            d->postponed_autorepeat = nullptr;
             return ret;
         }
     }
@@ -1412,7 +1412,7 @@ bool TDEHTMLView::dispatchKeyEvent( TQKeyEvent *_ke )
         // a keypress after them (e.g. due to TQAccel)
         if ( d->postponed_autorepeat ) {
             delete d->postponed_autorepeat;
-            d->postponed_autorepeat = 0;
+            d->postponed_autorepeat = nullptr;
         }
 
         if( !_ke->isAutoRepeat()) {
@@ -2108,7 +2108,7 @@ bool TDEHTMLView::focusNextPrevNode(bool next)
     // emit events in that case..
     if (oldFocusNode && oldFocusNode->renderer() &&
         !oldFocusNode->renderer()->parent()) {
-        doc->setFocusNode(0);
+        doc->setFocusNode(nullptr);
         return true;
     }
 
@@ -2126,9 +2126,9 @@ bool TDEHTMLView::focusNextPrevNode(bool next)
 
 	if (!toFocus && oldFocusNode)
 	    if (next)
-		toFocus = doc->nextFocusNode(NULL);
+		toFocus = doc->nextFocusNode(nullptr);
 	    else
-		toFocus = doc->previousFocusNode(NULL);
+		toFocus = doc->previousFocusNode(nullptr);
 
 	while (toFocus && toFocus != oldFocusNode)
 	{
@@ -2160,9 +2160,9 @@ bool TDEHTMLView::focusNextPrevNode(bool next)
 
 	    if (!toFocus && oldFocusNode)
 		if (next)
-		    toFocus = doc->nextFocusNode(NULL);
+		    toFocus = doc->nextFocusNode(nullptr);
 		else
-		    toFocus = doc->previousFocusNode(NULL);
+		    toFocus = doc->previousFocusNode(nullptr);
 	}
 
 	d->scrollBarMoved = false;
@@ -2177,7 +2177,7 @@ bool TDEHTMLView::focusNextPrevNode(bool next)
 	return true;
     }
 
-    NodeImpl *newFocusNode = NULL;
+    NodeImpl *newFocusNode = nullptr;
 
     if (d->tabMovePending && next != d->lastTabbingDirection)
     {
@@ -2256,8 +2256,8 @@ bool TDEHTMLView::focusNextPrevNode(bool next)
 void TDEHTMLView::displayAccessKeys()
 {
     TQValueVector< TQChar > taken;
-    displayAccessKeys( NULL, this, taken, false );
-    displayAccessKeys( NULL, this, taken, true );
+    displayAccessKeys( nullptr, this, taken, false );
+    displayAccessKeys( nullptr, this, taken, true );
 }
 
 void TDEHTMLView::displayAccessKeys( TDEHTMLView* caller, TDEHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks )
@@ -2265,7 +2265,7 @@ void TDEHTMLView::displayAccessKeys( TDEHTMLView* caller, TDEHTMLView* origview,
     TQMap< ElementImpl*, TQChar > fallbacks;
     if( use_fallbacks )
         fallbacks = buildFallbackAccessKeys();
-    for( NodeImpl* n = m_part->xmlDocImpl(); n != NULL; n = n->traverseNextNode()) {
+    for( NodeImpl* n = m_part->xmlDocImpl(); n; n = n->traverseNextNode()) {
         if( n->isElementNode()) {
             ElementImpl* en = static_cast< ElementImpl* >( n );
             DOMString s = en->getAttribute( ATTR_ACCESSKEY );
@@ -2282,7 +2282,7 @@ void TDEHTMLView::displayAccessKeys( TDEHTMLView* caller, TDEHTMLView* origview,
             }
             if( !accesskey.isNull()) {
 	        TQRect rec=en->getRect();
-	        TQLabel *lab=new TQLabel(accesskey,viewport(),0,(WFlags)WDestructiveClose);
+	        TQLabel *lab=new TQLabel(accesskey,viewport(),nullptr,(WFlags)WDestructiveClose);
 	        connect( origview, TQ_SIGNAL(hideAccessKeys()), lab, TQ_SLOT(close()) );
 	        connect( this, TQ_SIGNAL(repaintAccessKeys()), lab, TQ_SLOT(repaint()));
 	        lab->setPalette(TQToolTip::palette());
@@ -2302,7 +2302,7 @@ void TDEHTMLView::displayAccessKeys( TDEHTMLView* caller, TDEHTMLView* origview,
         return;
     TQPtrList<KParts::ReadOnlyPart> frames = m_part->frames();
     for( TQPtrListIterator<KParts::ReadOnlyPart> it( frames );
-         it != NULL;
+         it;
          ++it ) {
         if( !(*it)->inherits( "TDEHTMLPart" ))
             continue;
@@ -2356,7 +2356,7 @@ bool TDEHTMLView::focusNodeWithAccessKey( TQChar c, TDEHTMLView* caller )
     if( !node ) {
         TQPtrList<KParts::ReadOnlyPart> frames = m_part->frames();
         for( TQPtrListIterator<KParts::ReadOnlyPart> it( frames );
-             it != NULL;
+             it;
              ++it ) {
             if( !(*it)->inherits( "TDEHTMLPart" ))
                 continue;
@@ -2370,7 +2370,7 @@ bool TDEHTMLView::focusNodeWithAccessKey( TQChar c, TDEHTMLView* caller )
             && m_part->parentPart()->view() != caller
             && m_part->parentPart()->view()->focusNodeWithAccessKey( c, this ))
             return true;
-        if( caller == NULL ) { // the active frame (where the accesskey was pressed)
+        if( !caller ) { // the active frame (where the accesskey was pressed)
             TQMap< ElementImpl*, TQChar > fallbacks = buildFallbackAccessKeys();
             for( TQMap< ElementImpl*, TQChar >::ConstIterator it = fallbacks.begin();
                  it != fallbacks.end();
@@ -2380,7 +2380,7 @@ bool TDEHTMLView::focusNodeWithAccessKey( TQChar c, TDEHTMLView* caller )
                     break;
                 }
         }
-        if( node == NULL )
+        if( !node )
             return false;
     }
 
@@ -2412,10 +2412,10 @@ bool TDEHTMLView::focusNodeWithAccessKey( TQChar c, TDEHTMLView* caller )
         TQFocusEvent::setReason( TQFocusEvent::Shortcut );
         m_part->xmlDocImpl()->setFocusNode(node);
         TQFocusEvent::resetReason();
-        if( node != NULL && node->hasOneRef()) // deleted, only held by guard
+        if( node && node->hasOneRef()) // deleted, only held by guard
             return true;
         emit m_part->nodeActivated(Node(node));
-        if( node != NULL && node->hasOneRef())
+        if( node && node->hasOneRef())
             return true;
     }
 
@@ -2445,7 +2445,7 @@ static TQString getElementText( NodeImpl* start, bool after )
 {
     TQString ret;             // nextSibling(), to go after e.g. </select>
     for( NodeImpl* n = after ? start->nextSibling() : start->traversePreviousNode();
-         n != NULL;
+         n;
          n = after ? n->traverseNextNode() : n->traversePreviousNode()) {
         if( n->isTextNode()) {
             if( after )
@@ -2496,7 +2496,7 @@ static TQMap< NodeImpl*, TQString > buildLabels( NodeImpl* start )
 {
     TQMap< NodeImpl*, TQString > ret;
     for( NodeImpl* n = start;
-         n != NULL;
+         n;
          n = n->traverseNextNode()) {
         if( n->id() == ID_LABEL ) {
             HTMLLabelElementImpl* label = static_cast< HTMLLabelElementImpl* >( n );
@@ -2523,13 +2523,13 @@ TQMap< ElementImpl*, TQChar > TDEHTMLView::buildFallbackAccessKeys() const
     TQValueList< AccessKeyData > data;
     TQMap< NodeImpl*, TQString > labels = buildLabels( m_part->xmlDocImpl());
     for( NodeImpl* n = m_part->xmlDocImpl();
-         n != NULL;
+         n;
          n = n->traverseNextNode()) {
         if( n->isElementNode()) {
             ElementImpl* element = static_cast< ElementImpl* >( n );
             if( element->getAttribute( ATTR_ACCESSKEY ).length() == 1 )
                 continue; // has accesskey set, ignore
-            if( element->renderer() == NULL )
+            if( !element->renderer() )
                 continue; // not visible
             TQString text;
             TQString url;
@@ -2648,7 +2648,7 @@ TQMap< ElementImpl*, TQChar > TDEHTMLView::buildFallbackAccessKeys() const
     for( char c = '0'; c <= '9'; ++c )
         keys << c;
     for( NodeImpl* n = m_part->xmlDocImpl();
-         n != NULL;
+         n;
          n = n->traverseNextNode()) {
         if( n->isElementNode()) {
             ElementImpl* en = static_cast< ElementImpl* >( n );
@@ -2949,7 +2949,7 @@ void TDEHTMLView::print(bool quick)
         root->setPagedMode(false);
         root->setStaticMode(false);
         d->paged = false;
-        tdehtml::setPrintPainter( 0 );
+        tdehtml::setPrintPainter( nullptr );
         setMediaType( oldMediaType );
         m_part->xmlDocImpl()->setPaintDevice( this );
         m_part->xmlDocImpl()->styleSelector()->computeFontSizes(m_part->xmlDocImpl()->paintDeviceMetrics(), m_part->zoomFactor());
@@ -3181,7 +3181,7 @@ bool TDEHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
 
         // ### this code sucks. we should save the oldUnder instead of calculating
         // it again. calculating is expensive! (Dirk)
-        NodeImpl *oldUnder = 0;
+        NodeImpl *oldUnder = nullptr;
 	if (d->prevMouseX >= 0 && d->prevMouseY >= 0) {
 	    NodeImpl::MouseEvent mev( _mouse->stateAfter(), static_cast<NodeImpl::MouseEventType>(mouseEventType));
 	    m_part->xmlDocImpl()->prepareMouseEvent( true, d->prevMouseX, d->prevMouseY, &mev );
@@ -3233,7 +3233,7 @@ bool TDEHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
 						true,cancelable,m_part->xmlDocImpl()->defaultView(),
 						detail,screenX,screenY,clientX,clientY,pageX, pageY,
 						ctrlKey,altKey,shiftKey,metaKey,
-						button,0, _mouse, dblclick );
+						button,nullptr, _mouse, dblclick );
         me->ref();
         targetNode->dispatchEvent(me,exceptioncode,true);
 	bool defaultHandled = me->defaultHandled();
@@ -3251,7 +3251,7 @@ bool TDEHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
             if (nodeImpl && nodeImpl->isMouseFocusable())
                 m_part->xmlDocImpl()->setFocusNode(nodeImpl);
             else if (!nodeImpl || !nodeImpl->focused())
-                m_part->xmlDocImpl()->setFocusNode(0);
+                m_part->xmlDocImpl()->setFocusNode(nullptr);
         }
     }
 
@@ -3341,7 +3341,7 @@ void TDEHTMLView::focusInEvent( TQFocusEvent *e )
 #ifndef TDEHTML_NO_TYPE_AHEAD_FIND
     m_part->enableFindAheadActions( true );
 #endif
-    DOM::NodeImpl* fn = m_part->xmlDocImpl() ? m_part->xmlDocImpl()->focusNode() : 0;
+    DOM::NodeImpl* fn = m_part->xmlDocImpl() ? m_part->xmlDocImpl()->focusNode() : nullptr;
     if (fn && fn->renderer() && fn->renderer()->isWidget() &&
         (e->reason() != TQFocusEvent::Mouse) &&
         static_cast<tdehtml::RenderWidget*>(fn->renderer())->widget())
@@ -3724,7 +3724,7 @@ void TDEHTMLView::ensureNodeHasFocus(NodeImpl *node)
   if (node->focused()) return;
 
   // Find first ancestor whose "user-input" is "enabled"
-  NodeImpl *firstAncestor = 0;
+  NodeImpl *firstAncestor = nullptr;
   while (node) {
     if (node->renderer()
        && node->renderer()->style()->userInput() != UI_ENABLED)
@@ -3733,7 +3733,7 @@ void TDEHTMLView::ensureNodeHasFocus(NodeImpl *node)
     node = node->parentNode();
   }/*wend*/
 
-  if (!node) firstAncestor = 0;
+  if (!node) firstAncestor = nullptr;
 
   DocumentImpl *doc = m_part->xmlDocImpl();
   // ensure that embedded widgets don't lose their focus
@@ -4112,7 +4112,7 @@ bool TDEHTMLView::moveCaretTo(NodeImpl *node, long offset, bool clearSel)
 {
   if (!node) return false;
   ElementImpl *baseElem = determineBaseElement(node);
-  RenderFlow *base = static_cast<RenderFlow *>(baseElem ? baseElem->renderer() : 0);
+  RenderFlow *base = static_cast<RenderFlow *>(baseElem ? baseElem->renderer() : nullptr);
   if (!node) return false;
 
   // need to find out the node's inline box. If there is none, this function
@@ -4142,7 +4142,7 @@ bool TDEHTMLView::moveCaretTo(NodeImpl *node, long offset, bool clearSel)
 #endif
     } else {	// box has no associated element -> do not use
       // this case should actually never happen.
-      box = 0;
+      box = nullptr;
       kdError(6200) << "Box contains no node! Crash imminent" << endl;
     }/*end if*/
   }
@@ -4177,7 +4177,7 @@ bool TDEHTMLView::moveCaretTo(NodeImpl *node, long offset, bool clearSel)
   // also, then two caretPositionChanged signals with a null Node are
   // emitted in series.
   if (posChanged) {
-    m_part->emitCaretPositionChanged(visible_caret ? node : 0, offset);
+    m_part->emitCaretPositionChanged(visible_caret ? node : nullptr, offset);
   }/*end if*/
 
   return selChanged;
@@ -4395,7 +4395,7 @@ void TDEHTMLView::moveCaretBy(bool next, CaretMovement cmv, int count)
     }/*end if*/
 //kdDebug(6200) << "movecaret" << endl;
   }/*wend*/
-  CaretBox *hintBox = 0;	// make gcc uninit warning disappear
+  CaretBox *hintBox = nullptr;	// make gcc uninit warning disappear
   if (!it.isEnd()) {
     NodeImpl *node = caretNodeRef.handle();
     hintBox = it.caretBox();
diff --git a/tdehtml/tdehtmlview.h b/tdehtml/tdehtmlview.h
index 6f3ad6684..71a30357a 100644
--- a/tdehtml/tdehtmlview.h
+++ b/tdehtml/tdehtmlview.h
@@ -103,7 +103,7 @@ public:
     /**
      * Constructs a TDEHTMLView.
      */
-    TDEHTMLView( TDEHTMLPart *part, TQWidget *parent, const char *name=0 );
+    TDEHTMLView( TDEHTMLPart *part, TQWidget *parent, const char *name=nullptr );
     virtual ~TDEHTMLView();
 
     /**
@@ -248,7 +248,7 @@ private slots:
 
 private:
 
-    void scheduleRelayout(tdehtml::RenderObject* clippedObj=0);
+    void scheduleRelayout(tdehtml::RenderObject* clippedObj=nullptr);
     void unscheduleRelayout();
 
     void scheduleRepaint(int x, int y, int w, int h, bool asap=false);
@@ -267,7 +267,7 @@ private:
      * more, if nonzero will be set to true if the documents extends
      * beyond the rc or false if everything below yOff was painted.
      **/
-    void paint(TQPainter *p, const TQRect &rc, int yOff = 0, bool *more = 0);
+    void paint(TQPainter *p, const TQRect &rc, int yOff = 0, bool *more = nullptr);
 
 #if 0
     /**
@@ -296,7 +296,7 @@ private:
 
     bool focusNextPrevNode(bool next);
     bool handleAccessKey(const TQKeyEvent* ev);
-    bool focusNodeWithAccessKey(TQChar c, TDEHTMLView* caller = NULL);
+    bool focusNodeWithAccessKey(TQChar c, TDEHTMLView* caller = nullptr);
     TQMap< DOM::ElementImpl*, TQChar > buildFallbackAccessKeys() const;
     void displayAccessKeys( TDEHTMLView* caller, TDEHTMLView* origview, TQValueVector< TQChar >& taken, bool use_fallbacks );
 
@@ -365,7 +365,7 @@ private:
      * @param hintBox caret box whose coordinates will be used if the
      * caret position could not be determined otherwise.
      */
-    void recalcAndStoreCaretPos(tdehtml::CaretBox *hintBox = 0);
+    void recalcAndStoreCaretPos(tdehtml::CaretBox *hintBox = nullptr);
     /** displays the caret and reinitializes the blink frequency timer.
      *
      * The caret will only be displayed on screen if the view has focus, or
@@ -428,7 +428,7 @@ private:
      * caret position could not be determined otherwise.
      * @return @p true if the caret has been displayed.
      */
-    bool placeCaret(tdehtml::CaretBox *hintBox = 0);
+    bool placeCaret(tdehtml::CaretBox *hintBox = nullptr);
 
     /** extends the selection up to the current caret position.
      *
diff --git a/tdehtml/tdemultipart/tdemultipart.cpp b/tdehtml/tdemultipart/tdemultipart.cpp
index ccb7cdaea..af044e9b7 100644
--- a/tdehtml/tdemultipart/tdemultipart.cpp
+++ b/tdehtml/tdemultipart/tdemultipart.cpp
@@ -97,7 +97,7 @@ KMultiPart::KMultiPart( TQWidget *parentWidget, const char *widgetName,
                         TQObject *parent, const char *name, const TQStringList& )
     : KParts::ReadOnlyPart( parent, name )
 {
-    m_filter = 0L;
+    m_filter = nullptr;
 
     setInstance( KMultiPartFactory::instance() );
 
@@ -108,11 +108,11 @@ KMultiPart::KMultiPart( TQWidget *parentWidget, const char *widgetName,
 
     // We probably need to use m_extension to get the urlArgs in openURL...
 
-    m_part = 0L;
+    m_part = nullptr;
     m_isHTMLPart = false;
-    m_job = 0L;
+    m_job = nullptr;
     m_lineParser = new KLineParser;
-    m_tempFile = 0L;
+    m_tempFile = nullptr;
 
     m_timer = new TQTimer( this );
     connect( m_timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotProgressInfo() ) );
@@ -136,7 +136,7 @@ KMultiPart::~KMultiPart()
         delete m_tempFile;
     }
     delete m_filter;
-    m_filter = 0L;
+    m_filter = nullptr;
 }
 
 
@@ -147,7 +147,7 @@ void KMultiPart::startHeader()
     m_gzip = false;
     // just to be sure for now
     delete m_filter;
-    m_filter = 0L;
+    m_filter = nullptr;
 }
 
 
@@ -165,7 +165,7 @@ bool KMultiPart::openURL( const KURL &url )
 
     m_job = TDEIO::get( url, args.reload, false );
 
-    emit started( 0 /*m_job*/ ); // don't pass the job, it would interfer with our own infoMessage
+    emit started( nullptr /*m_job*/ ); // don't pass the job, it would interfer with our own infoMessage
 
     connect( m_job, TQ_SIGNAL( result( TDEIO::Job * ) ),
              this, TQ_SLOT( slotJobFinished( TDEIO::Job * ) ) );
@@ -314,7 +314,7 @@ void KMultiPart::setPart( const TQString& mimeType )
     delete m_part;
     // Try to find an appropriate viewer component
     m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>
-             ( m_mimeType, TQString::null, widget(), 0L, this, 0L );
+             ( m_mimeType, TQString::null, widget(), nullptr, this, nullptr );
     if ( !m_part ) {
         // TODO launch external app
         KMessageBox::error( widget(), i18n("No handler found for %1!").arg(m_mimeType) );
@@ -433,7 +433,7 @@ void KMultiPart::startOfData()
     if ( m_tempFile ) {
         m_tempFile->setAutoDelete( true );
         delete m_tempFile;
-        m_tempFile = 0;
+        m_tempFile = nullptr;
     }
     if ( m_isHTMLPart )
     {
@@ -499,7 +499,7 @@ void KMultiPart::endOfData()
             (void) m_part->openURL( url );
         }
         delete m_tempFile;
-        m_tempFile = 0L;
+        m_tempFile = nullptr;
     }
 }
 
@@ -553,7 +553,7 @@ void KMultiPart::slotJobFinished( TDEIO::Job *job )
 
         //TQTimer::singleShot( 0, this, TQ_SLOT( updateWindowCaption() ) );
     }
-    m_job = 0L;
+    m_job = nullptr;
 }
 
 void KMultiPart::slotProgressInfo()
diff --git a/tdehtml/tdemultipart/tdemultipart.h b/tdehtml/tdemultipart/tdemultipart.h
index 75b7c18a3..03b97d13c 100644
--- a/tdehtml/tdemultipart/tdemultipart.h
+++ b/tdehtml/tdemultipart/tdemultipart.h
@@ -101,7 +101,7 @@ class KMultiPartBrowserExtension : public KParts::BrowserExtension
 {
     //TQ_OBJECT
 public:
-    KMultiPartBrowserExtension( KMultiPart *parent, const char *name = 0 );
+    KMultiPartBrowserExtension( KMultiPart *parent, const char *name = nullptr );
 
     virtual int xOffset();
     virtual int yOffset();
diff --git a/tdehtml/test_regression.cpp b/tdehtml/test_regression.cpp
index 7082c9aed..404800f20 100644
--- a/tdehtml/test_regression.cpp
+++ b/tdehtml/test_regression.cpp
@@ -112,7 +112,7 @@ static pid_t xvfb;
 
 // -------------------------------------------------------------------------
 
-PartMonitor *PartMonitor::sm_highestMonitor = NULL;
+PartMonitor *PartMonitor::sm_highestMonitor = nullptr;
 
 PartMonitor::PartMonitor(TDEHTMLPart *_part)
 {
@@ -126,7 +126,7 @@ PartMonitor::PartMonitor(TDEHTMLPart *_part)
 PartMonitor::~PartMonitor()
 {
    if (this == sm_highestMonitor)
-	sm_highestMonitor = 0;
+	sm_highestMonitor = nullptr;
 }
 
 
@@ -505,7 +505,7 @@ int main(int argc, char *argv[])
         if ( !xvfb ) {
             TQCString buffer = fpaths.join(",").latin1();
             execl( xvfbPath8.data(), xvfbPath8.data(), "-once", "-dpi", "100", "-screen", "0",
-                    "1024x768x16", "-ac", "-fp", buffer.data(), ":47", (char*)NULL );
+                    "1024x768x16", "-ac", "-fp", buffer.data(), ":47", static_cast<char *>(nullptr) );
         }
 
         setenv( "DISPLAY", ":47", 1 );
@@ -668,7 +668,7 @@ int main(int argc, char *argv[])
 
 // -------------------------------------------------------------------------
 
-RegressionTest *RegressionTest::curr = 0;
+RegressionTest *RegressionTest::curr = nullptr;
 
 RegressionTest::RegressionTest(TDEHTMLPart *part, const TQString &baseDir, const TQString &outputDir,
 			       bool _genOutput, bool runJS, bool runHTML)
@@ -705,7 +705,7 @@ RegressionTest::RegressionTest(TDEHTMLPart *part, const TQString &baseDir, const
     f.writeBlock( s.latin1(), s.length() );
     f.close();
 
-    m_paintBuffer = 0;
+    m_paintBuffer = nullptr;
 
     curr = this;
 }
diff --git a/tdehtml/test_regression_fontoverload.cpp b/tdehtml/test_regression_fontoverload.cpp
index 6cb06f824..045c23a97 100644
--- a/tdehtml/test_regression_fontoverload.cpp
+++ b/tdehtml/test_regression_fontoverload.cpp
@@ -222,7 +222,7 @@ TQFontDatabase::findFont( TQFont::Script script, const QFontPrivate *fp,
     else
         xlfd = helv_pickxlfd( request.pixelSize, request.italic, request.weight > 50 );
 
-    QFontEngine *fe = 0;
+    QFontEngine *fe = nullptr;
 
     XFontStruct *xfs;
     xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.latin1() );
diff --git a/tdehtml/xml/dom2_eventsimpl.cpp b/tdehtml/xml/dom2_eventsimpl.cpp
index 1ee36c82d..2e0e3d011 100644
--- a/tdehtml/xml/dom2_eventsimpl.cpp
+++ b/tdehtml/xml/dom2_eventsimpl.cpp
@@ -38,16 +38,16 @@ using namespace tdehtml;
 
 EventImpl::EventImpl()
 {
-    m_type = 0;
+    m_type = nullptr;
     m_canBubble = false;
     m_cancelable = false;
 
     m_propagationStopped = false;
     m_defaultPrevented = false;
     m_id = UNKNOWN_EVENT;
-    m_currentTarget = 0;
+    m_currentTarget = nullptr;
     m_eventPhase = 0;
-    m_target = 0;
+    m_target = nullptr;
     m_createTime = TQDateTime::currentDateTime();
     m_defaultHandled = false;
 }
@@ -64,9 +64,9 @@ EventImpl::EventImpl(EventId _id, bool canBubbleArg, bool cancelableArg)
     m_propagationStopped = false;
     m_defaultPrevented = false;
     m_id = _id;
-    m_currentTarget = 0;
+    m_currentTarget = nullptr;
     m_eventPhase = 0;
-    m_target = 0;
+    m_target = nullptr;
     m_createTime = TQDateTime::currentDateTime();
     m_defaultHandled = false;
 }
@@ -351,8 +351,8 @@ MouseEventImpl::MouseEventImpl()
     m_shiftKey = false;
     m_metaKey = false;
     m_button = 0;
-    m_relatedTarget = 0;
-    m_qevent = 0;
+    m_relatedTarget = nullptr;
+    m_qevent = nullptr;
     m_isDoubleClick = false;
 }
 
@@ -407,7 +407,7 @@ void MouseEventImpl::computeLayerPos()
     m_layerX = m_pageX;
     m_layerY = m_pageY;
 
-    DocumentImpl* doc = view() ? view()->document() : 0;
+    DocumentImpl* doc = view() ? view()->document() : nullptr;
     if (doc) {
         tdehtml::RenderObject::NodeInfo renderInfo(true, false);
         doc->renderer()->layer()->nodeAtPoint(renderInfo, m_pageX, m_pageY);
@@ -471,7 +471,7 @@ void MouseEventImpl::initMouseEvent(const DOMString &typeArg,
 
     // ### make this on-demand. its soo sloooow
     computeLayerPos();
-    m_qevent = 0;
+    m_qevent = nullptr;
 }
 
 bool MouseEventImpl::isMouseEvent() const
@@ -614,7 +614,7 @@ void KeyEventBaseImpl::initKeyBaseEvent(const DOMString &typeArg,
 {
     m_synthetic = true;
     delete m_keyEvent;
-    m_keyEvent = 0;
+    m_keyEvent = nullptr;
     initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, 1);
     m_virtKeyVal = virtKeyValArg;
     m_keyVal     = keyValArg;
@@ -716,7 +716,7 @@ static const IDTranslator<TQCString, unsigned, const char*>::Info keyIdentifiers
     {"F22", KeyEventBaseImpl::DOM_VK_F22},
     {"F23", KeyEventBaseImpl::DOM_VK_F23},
     {"F24", KeyEventBaseImpl::DOM_VK_F24},
-    {0, 0}
+    {nullptr, 0}
 };
 
 MAKE_TRANSLATOR(keyIdentifiersToVirtKeys, TQCString, unsigned, const char*, keyIdentifiersToVirtKeysTable)
@@ -727,7 +727,7 @@ static const IDTranslator<TQCString, unsigned, const char*>::Info keyModifiersTo
     {"Control",     TQt::ControlButton},
     {"Shift",       TQt::ShiftButton},
     {"Meta",        TQt::MetaButton},
-    {0,             0}
+    {nullptr,             0}
 };
 
 MAKE_TRANSLATOR(keyModifiersToCode, TQCString, unsigned, const char*, keyModifiersToCodeTable)
@@ -883,10 +883,10 @@ int TextEventImpl::charCode() const
 // -----------------------------------------------------------------------------
 MutationEventImpl::MutationEventImpl()
 {
-    m_relatedNode = 0;
-    m_prevValue = 0;
-    m_newValue = 0;
-    m_attrName = 0;
+    m_relatedNode = nullptr;
+    m_prevValue = nullptr;
+    m_newValue = nullptr;
+    m_attrName = nullptr;
     m_attrChange = 0;
 }
 
diff --git a/tdehtml/xml/dom2_eventsimpl.h b/tdehtml/xml/dom2_eventsimpl.h
index 0f48fa605..852bb6083 100644
--- a/tdehtml/xml/dom2_eventsimpl.h
+++ b/tdehtml/xml/dom2_eventsimpl.h
@@ -150,7 +150,7 @@ protected:
 class UIEventImpl : public EventImpl
 {
 public:
-    UIEventImpl() : m_view(0), m_detail(0) {}
+    UIEventImpl() : m_view(nullptr), m_detail(0) {}
     UIEventImpl(EventId _id,
 		bool canBubbleArg,
 		bool cancelableArg,
@@ -193,7 +193,7 @@ public:
 		   bool metaKeyArg,
 		   unsigned short buttonArg,
 		   NodeImpl *relatedTargetArg,
-		   TQMouseEvent *qe = 0,
+		   TQMouseEvent *qe = nullptr,
                    bool isDoubleClick = false);
     virtual ~MouseEventImpl();
     long screenX() const { return m_screenX; }
@@ -341,7 +341,7 @@ public:
   //Returns true if the event was synthesized by client use of DOM
   bool isSynthetic() const { return m_synthetic; }
 protected:
-  KeyEventBaseImpl(): m_keyEvent(0), m_keyVal(0), m_virtKeyVal(0), m_modifier(0), m_synthetic(false)
+  KeyEventBaseImpl(): m_keyEvent(nullptr), m_keyVal(0), m_virtKeyVal(0), m_modifier(0), m_synthetic(false)
   {  m_detail = 0; }
 
   KeyEventBaseImpl(EventId id,
@@ -476,12 +476,12 @@ protected:
 
 class RegisteredEventListener {
 public:
-    RegisteredEventListener() : id(EventImpl::EventId(0)), useCapture(false), listener(0) {}
+    RegisteredEventListener() : id(EventImpl::EventId(0)), useCapture(false), listener(nullptr) {}
 
     RegisteredEventListener(EventImpl::EventId _id, EventListener *_listener, bool _useCapture)
         : id(_id), useCapture(_useCapture), listener(_listener) { if (listener) listener->ref(); }
 
-    ~RegisteredEventListener() { if (listener) listener->deref(); listener = 0; }
+    ~RegisteredEventListener() { if (listener) listener->deref(); listener = nullptr; }
 
     bool operator==(const RegisteredEventListener &other) const
     { return id == other.id && listener == other.listener && useCapture == other.useCapture; }
diff --git a/tdehtml/xml/dom2_rangeimpl.cpp b/tdehtml/xml/dom2_rangeimpl.cpp
index f8ff4fc89..9a46538ea 100644
--- a/tdehtml/xml/dom2_rangeimpl.cpp
+++ b/tdehtml/xml/dom2_rangeimpl.cpp
@@ -75,7 +75,7 @@ NodeImpl *RangeImpl::startContainer(int &exceptioncode) const
 {
     if (m_detached) {
         exceptioncode = DOMException::INVALID_STATE_ERR;
-        return 0;
+        return nullptr;
     }
 
     return m_startContainer;
@@ -95,7 +95,7 @@ NodeImpl *RangeImpl::endContainer(int &exceptioncode) const
 {
     if (m_detached) {
         exceptioncode = DOMException::INVALID_STATE_ERR;
-        return 0;
+        return nullptr;
     }
 
     return m_endContainer;
@@ -115,7 +115,7 @@ NodeImpl *RangeImpl::commonAncestorContainer(int &exceptioncode)
 {
     if (m_detached) {
         exceptioncode = DOMException::INVALID_STATE_ERR;
-        return 0;
+        return nullptr;
     }
 
     NodeImpl *com = commonAncestorContainer(m_startContainer,m_endContainer);
@@ -404,16 +404,16 @@ DocumentFragmentImpl *RangeImpl::processContents ( ActionType action, int &excep
     // ### perhaps disable node deletion notification for this range while we do this?
 
     if (collapsed(exceptioncode))
-        return 0;
+        return nullptr;
     if (exceptioncode)
-        return 0;
+        return nullptr;
 
     NodeImpl *cmnRoot = commonAncestorContainer(exceptioncode);
     if (exceptioncode)
-        return 0;
+        return nullptr;
 
     // what is the highest node that partially selects the start of the range?
-    NodeImpl *partialStart = 0;
+    NodeImpl *partialStart = nullptr;
     if (m_startContainer != cmnRoot) {
 	partialStart = m_startContainer;
 	while (partialStart->parentNode() != cmnRoot)
@@ -421,14 +421,14 @@ DocumentFragmentImpl *RangeImpl::processContents ( ActionType action, int &excep
     }
 
     // what is the highest node that partially selects the end of the range?
-    NodeImpl *partialEnd = 0;
+    NodeImpl *partialEnd = nullptr;
     if (m_endContainer != cmnRoot) {
 	partialEnd = m_endContainer;
 	while (partialEnd->parentNode() != cmnRoot)
 	    partialEnd = partialEnd->parentNode();
     }
 
-    DocumentFragmentImpl *fragment = 0;
+    DocumentFragmentImpl *fragment = nullptr;
     if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS)
         fragment = new DocumentFragmentImpl(m_ownerDocument);
 
@@ -489,7 +489,7 @@ DocumentFragmentImpl *RangeImpl::processContents ( ActionType action, int &excep
     //
     // These are deleted, cloned, or extracted (i.e. both) depending on action.
 
-    NodeImpl *leftContents = 0;
+    NodeImpl *leftContents = nullptr;
     if (m_startContainer != cmnRoot) {
         // process the left-hand side of the range, up until the last ancestor of
         // m_startContainer before cmnRoot
@@ -552,7 +552,7 @@ DocumentFragmentImpl *RangeImpl::processContents ( ActionType action, int &excep
         }
     }
 
-    NodeImpl *rightContents = 0;
+    NodeImpl *rightContents = nullptr;
     if (m_endContainer != cmnRoot) {
         // delete the right-hand side of the range, up until the last ancestor of
         // m_endContainer before cmnRoot
@@ -690,12 +690,12 @@ DocumentFragmentImpl *RangeImpl::extractContents( int &exceptioncode )
 {
     if (m_detached) {
         exceptioncode = DOMException::INVALID_STATE_ERR;
-        return 0;
+        return nullptr;
     }
 
     checkDeleteExtract(exceptioncode);
     if (exceptioncode)
-	return 0;
+	return nullptr;
 
     return processContents(EXTRACT_CONTENTS,exceptioncode);
 }
@@ -704,7 +704,7 @@ DocumentFragmentImpl *RangeImpl::cloneContents( int &exceptioncode  )
 {
     if (m_detached) {
         exceptioncode = DOMException::INVALID_STATE_ERR;
-        return 0;
+        return nullptr;
     }
 
     return processContents(CLONE_CONTENTS,exceptioncode);
@@ -1182,10 +1182,10 @@ void RangeImpl::detach( int &exceptioncode )
 
     if (m_startContainer)
         m_startContainer->deref();
-    m_startContainer = 0;
+    m_startContainer = nullptr;
     if (m_endContainer)
         m_endContainer->deref();
-    m_endContainer = 0;
+    m_endContainer = nullptr;
     m_detached = true;
 }
 
@@ -1252,7 +1252,7 @@ RangeImpl *RangeImpl::cloneRange(int &exceptioncode)
 {
     if (m_detached) {
         exceptioncode = DOMException::INVALID_STATE_ERR;
-        return 0;
+        return nullptr;
     }
 
     return new RangeImpl(m_ownerDocument,m_startContainer,m_startOffset,m_endContainer,m_endOffset);
diff --git a/tdehtml/xml/dom2_traversalimpl.cpp b/tdehtml/xml/dom2_traversalimpl.cpp
index 2abdadead..436df1f46 100644
--- a/tdehtml/xml/dom2_traversalimpl.cpp
+++ b/tdehtml/xml/dom2_traversalimpl.cpp
@@ -74,12 +74,12 @@ NodeImpl *NodeIteratorImpl::nextNode( int &exceptioncode )
 {
     if (m_detached) {
 	exceptioncode = DOMException::INVALID_STATE_ERR;
-	return 0;
+	return nullptr;
     }
 
     if (!m_referenceNode) {
 	m_inFront = true;
-	return 0;
+	return nullptr;
     }
 
     if (!m_inFront) {
@@ -96,7 +96,7 @@ NodeImpl *NodeIteratorImpl::nextNode( int &exceptioncode )
       _tempCurrent = getNextNode(_tempCurrent);
     }
 
-    return 0;
+    return nullptr;
 }
 
 NodeImpl *NodeIteratorImpl::getNextNode(NodeImpl *n)
@@ -108,13 +108,13 @@ NodeImpl *NodeIteratorImpl::getNextNode(NodeImpl *n)
    */
 
   if( !n )
-    return 0;
+    return nullptr;
 
   if( n->hasChildNodes() )
     return n->firstChild();
 
   if( m_root == n)
-     return 0;
+     return nullptr;
 
   if( n->nextSibling() )
     return n->nextSibling();
@@ -123,7 +123,7 @@ NodeImpl *NodeIteratorImpl::getNextNode(NodeImpl *n)
   while( parent )
     {
       if( m_root == parent )
-           return 0;
+           return nullptr;
 
       n = parent->nextSibling();
       if( n )
@@ -131,19 +131,19 @@ NodeImpl *NodeIteratorImpl::getNextNode(NodeImpl *n)
 
       parent = parent->parentNode();
     }
-  return 0;
+  return nullptr;
 }
 
 NodeImpl *NodeIteratorImpl::previousNode( int &exceptioncode )
 {
     if (m_detached) {
 	exceptioncode = DOMException::INVALID_STATE_ERR;
-	return 0;
+	return nullptr;
     }
 
     if (!m_referenceNode) {
 	m_inFront = false;
-	return 0;
+	return nullptr;
     }
 
     if (m_inFront) {
@@ -160,7 +160,7 @@ NodeImpl *NodeIteratorImpl::previousNode( int &exceptioncode )
 	_tempCurrent = getPreviousNode(_tempCurrent);
     }
 
-    return 0;
+    return nullptr;
 }
 
 NodeImpl *NodeIteratorImpl::getPreviousNode(NodeImpl *n)
@@ -172,7 +172,7 @@ NodeImpl *NodeIteratorImpl::getPreviousNode(NodeImpl *n)
   NodeImpl *_tempCurrent;
 
   if( !n || m_root == n )
-    return 0;
+    return nullptr;
 
   _tempCurrent = n->previousSibling();
   if( _tempCurrent )
@@ -262,7 +262,7 @@ short NodeIteratorImpl::isAccepted(NodeImpl *n)
 
 NodeFilterImpl::NodeFilterImpl()
 {
-    m_customNodeFilter = 0;
+    m_customNodeFilter = nullptr;
 }
 
 NodeFilterImpl::~NodeFilterImpl()
@@ -428,7 +428,7 @@ NodeImpl *TreeWalkerImpl::previousNode(  )
             return m_currentNode;
         }
         else                  // parent failed.. no previous node
-            return 0;
+            return nullptr;
     }
 
     NodeImpl *child = getLastChild( n );
@@ -442,7 +442,7 @@ NodeImpl *TreeWalkerImpl::previousNode(  )
         m_currentNode = n;
         return m_currentNode;
     }
-    return 0;            // should never get here!
+    return nullptr;            // should never get here!
 }
 
 NodeImpl *TreeWalkerImpl::nextNode(  )
@@ -478,7 +478,7 @@ NodeImpl *TreeWalkerImpl::nextNode(  )
         else
             parent = getParentNode( parent );
     }
-    return 0;
+    return nullptr;
 }
 
 short TreeWalkerImpl::isAccepted(NodeImpl *n)
@@ -499,12 +499,12 @@ NodeImpl *TreeWalkerImpl::getParentNode(NodeImpl *n)
     short _result = NodeFilter::FILTER_ACCEPT;
 
     if( n == m_rootNode /*|| !n*/ )
-      return 0;
+      return nullptr;
 
     NodeImpl *_tempCurrent = n->parentNode();
 
     if( !_tempCurrent )
-        return 0;
+        return nullptr;
 
     _result = isAccepted( _tempCurrent );
     if ( _result == NodeFilter::FILTER_ACCEPT )
@@ -518,7 +518,7 @@ NodeImpl *TreeWalkerImpl::getFirstChild(NodeImpl *n)
     short _result;
 
     if( !n || !n->firstChild() )
-        return 0;
+        return nullptr;
     n = n->firstChild();
 
     _result = isAccepted( n );
@@ -539,7 +539,7 @@ NodeImpl *TreeWalkerImpl::getFirstChild(NodeImpl *n)
         return getNextSibling( n );
         break;
     }
-    return 0;      // should never get here!
+    return nullptr;      // should never get here!
 }
 
 NodeImpl *TreeWalkerImpl::getLastChild(NodeImpl *n)
@@ -547,7 +547,7 @@ NodeImpl *TreeWalkerImpl::getLastChild(NodeImpl *n)
     short _result;
 
     if( !n || !n->lastChild() )
-        return 0;
+        return nullptr;
     n = n->lastChild();
     _result = isAccepted( n );
 
@@ -568,7 +568,7 @@ NodeImpl *TreeWalkerImpl::getLastChild(NodeImpl *n)
         return getPreviousSibling( n );
         break;
     }
-    return 0;
+    return nullptr;
 }
 
 NodeImpl *TreeWalkerImpl::getPreviousSibling(NodeImpl *n)
@@ -577,7 +577,7 @@ NodeImpl *TreeWalkerImpl::getPreviousSibling(NodeImpl *n)
     NodeImpl *_tempCurrent;
 
     if( !n )
-        return 0;
+        return nullptr;
     //first the cases if we have a previousSibling
     _tempCurrent = n->previousSibling();
     if( _tempCurrent )
@@ -608,24 +608,24 @@ NodeImpl *TreeWalkerImpl::getPreviousSibling(NodeImpl *n)
     {
         _tempCurrent = n->parentNode();
         if( !_tempCurrent || _tempCurrent == m_rootNode)
-            return 0;
+            return nullptr;
         _result = isAccepted( _tempCurrent );
         if ( _result == NodeFilter::FILTER_SKIP )
             return getPreviousSibling( _tempCurrent );
 
-        return 0;
+        return nullptr;
 
     }
-    return 0;  // should never get here!
+    return nullptr;  // should never get here!
 }
 
 NodeImpl *TreeWalkerImpl::getNextSibling(NodeImpl *n)
 {
-    NodeImpl *_tempCurrent = 0;
+    NodeImpl *_tempCurrent = nullptr;
     short _result;
 
     if( !n )
-        return 0;
+        return nullptr;
 
     _tempCurrent = n->nextSibling();
     if( _tempCurrent )
@@ -655,13 +655,13 @@ NodeImpl *TreeWalkerImpl::getNextSibling(NodeImpl *n)
     {
         _tempCurrent = n->parentNode();
         if( !_tempCurrent || _tempCurrent == m_rootNode)
-            return 0;
+            return nullptr;
         _result = isAccepted( _tempCurrent );
         if( _result == NodeFilter::FILTER_SKIP )
             return getNextSibling( _tempCurrent );
 
-        return 0;
+        return nullptr;
     }
-    return 0;
+    return nullptr;
 }
 
diff --git a/tdehtml/xml/dom2_viewsimpl.cpp b/tdehtml/xml/dom2_viewsimpl.cpp
index 217184aa1..e062307e6 100644
--- a/tdehtml/xml/dom2_viewsimpl.cpp
+++ b/tdehtml/xml/dom2_viewsimpl.cpp
@@ -42,7 +42,7 @@ AbstractViewImpl::~AbstractViewImpl()
 CSSStyleDeclarationImpl *AbstractViewImpl::getComputedStyle(ElementImpl* elt, DOMStringImpl* /*pseudoElt*/)
 {
     if (!elt)
-        return 0;
+        return nullptr;
 
     CSSStyleDeclarationImpl* style = new RenderStyleDeclarationImpl( elt );
     return style;
diff --git a/tdehtml/xml/dom_docimpl.cpp b/tdehtml/xml/dom_docimpl.cpp
index e280d195c..902d932bc 100644
--- a/tdehtml/xml/dom_docimpl.cpp
+++ b/tdehtml/xml/dom_docimpl.cpp
@@ -88,7 +88,7 @@ using namespace tdehtml;
 
 // ------------------------------------------------------------------------
 
-DOMImplementationImpl *DOMImplementationImpl::m_instance = 0;
+DOMImplementationImpl *DOMImplementationImpl::m_instance = nullptr;
 
 DOMImplementationImpl::DOMImplementationImpl()
 {
@@ -125,29 +125,29 @@ DocumentTypeImpl *DOMImplementationImpl::createDocumentType( const DOMString &qu
     // Not mentioned in spec: throw NAMESPACE_ERR if no qualifiedName supplied
     if (qualifiedName.isNull()) {
         exceptioncode = DOMException::NAMESPACE_ERR;
-        return 0;
+        return nullptr;
     }
 
     // INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
     if (!Element::tdehtmlValidQualifiedName(qualifiedName)) {
         exceptioncode = DOMException::INVALID_CHARACTER_ERR;
-        return 0;
+        return nullptr;
     }
 
     // NAMESPACE_ERR: Raised if the qualifiedName is malformed.
     // Added special case for the empty string, which seems to be a common pre-DOM2 misuse
     if (!qualifiedName.isEmpty() && Element::tdehtmlMalformedQualifiedName(qualifiedName)) {
         exceptioncode = DOMException::NAMESPACE_ERR;
-        return 0;
+        return nullptr;
     }
 
-    return new DocumentTypeImpl(this,0,qualifiedName,publicId,systemId);
+    return new DocumentTypeImpl(this,nullptr,qualifiedName,publicId,systemId);
 }
 
 DOMImplementationImpl* DOMImplementationImpl::getInterface(const DOMString& /*feature*/) const
 {
     // ###
-    return 0;
+    return nullptr;
 }
 
 DocumentImpl *DOMImplementationImpl::createDocument( const DOMString &namespaceURI, const DOMString &qualifiedName,
@@ -155,20 +155,20 @@ DocumentImpl *DOMImplementationImpl::createDocument( const DOMString &namespaceU
 {
     exceptioncode = 0;
 
-    if (!checkQualifiedName(qualifiedName, namespaceURI, 0, true/*nameCanBeNull*/,
+    if (!checkQualifiedName(qualifiedName, namespaceURI, nullptr, true/*nameCanBeNull*/,
                             true /*nameCanBeEmpty, see #61650*/, &exceptioncode) )
-        return 0;
+        return nullptr;
 
     DocumentTypeImpl *dtype = static_cast<DocumentTypeImpl*>(doctype.handle());
     // WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document or was
     // created from a different implementation.
     if (dtype && (dtype->getDocument() || dtype->implementation() != this)) {
         exceptioncode = DOMException::WRONG_DOCUMENT_ERR;
-        return 0;
+        return nullptr;
     }
 
     // ### this is completely broken.. without a view it will not work (Dirk)
-    DocumentImpl *doc = new DocumentImpl(this, 0);
+    DocumentImpl *doc = new DocumentImpl(this, nullptr);
 
     // now get the interesting parts of the doctype
     // ### create new one if not there (currently always there)
@@ -183,7 +183,7 @@ DocumentImpl *DOMImplementationImpl::createDocument( const DOMString &namespaceU
         if (exceptioncode) {
             delete element;
             delete doc;
-            return 0;
+            return nullptr;
         }
     }
     return doc;
@@ -194,7 +194,7 @@ CSSStyleSheetImpl *DOMImplementationImpl::createCSSStyleSheet(DOMStringImpl* /*t
 {
     // ### TODO : title should be set, and media could have wrong syntax, in which case we should
 	// generate an exception.
-	CSSStyleSheetImpl *parent = 0L;
+	CSSStyleSheetImpl *parent = nullptr;
 	CSSStyleSheetImpl *sheet = new CSSStyleSheetImpl(parent, DOMString());
 	sheet->setMedia(new MediaListImpl(sheet, media));
 	return sheet;
@@ -236,7 +236,7 @@ void ElementMappingCache::add(const TQString& id, ElementImpl* nd)
     if (info)
     {
         info->ref++;
-        info->nd = 0; //Now ambigous
+        info->nd = nullptr; //Now ambigous
     }
     else
     {
@@ -269,7 +269,7 @@ void ElementMappingCache::remove(const TQString& id, ElementImpl* nd)
     else
     {
         if (info->nd == nd)
-            info->nd = 0;
+            info->nd = nullptr;
     }
 }
 
@@ -281,7 +281,7 @@ bool ElementMappingCache::contains(const TQString& id)
 
 ElementMappingCache::ItemInfo* ElementMappingCache::get(const TQString& id)
 {
-    if (id.isEmpty()) return 0;
+    if (id.isEmpty()) return nullptr;
     return m_dict.find(id);
 }
 
@@ -290,14 +290,14 @@ TQPtrList<DocumentImpl> * DocumentImpl::changedDocuments;
 
 // TDEHTMLView might be 0
 DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *v)
-    : NodeBaseImpl( 0 ), m_domtree_version(0), m_counterDict(257),
+    : NodeBaseImpl( nullptr ), m_domtree_version(0), m_counterDict(257),
       m_imageLoadEventTimer(0)
 {
     m_document.resetSkippingRef(this); //Make getDocument return us..
     m_selfOnlyRefCount = 0;
 
-    m_paintDeviceMetrics = 0;
-    m_paintDevice = 0;
+    m_paintDeviceMetrics = nullptr;
+    m_paintDevice = nullptr;
     m_decoderMibEnum = 0;
     m_textColor = TQt::black;
 
@@ -311,13 +311,13 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *
         setPaintDevice( m_view );
     }
     else
-        m_docLoader = new DocLoader( 0, this );
+        m_docLoader = new DocLoader( nullptr, this );
 
     visuallyOrdered = false;
     m_bParsing = false;
     m_docChanged = false;
-    m_elemSheet = 0;
-    m_tokenizer = 0;
+    m_elemSheet = nullptr;
+    m_tokenizer = nullptr;
 
     // ### this should be created during parsing a <!DOCTYPE>
     // not during construction. Not sure who added that and why (Dirk)
@@ -341,18 +341,18 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *
     m_namespaceMap->names[emptyNamespace]->ref();
     m_namespaceMap->names[xhtmlNamespace]->ref();
     m_namespaceMap->count+=2;
-    m_focusNode = 0;
-    m_hoverNode = 0;
-    m_activeNode = 0;
+    m_focusNode = nullptr;
+    m_hoverNode = nullptr;
+    m_activeNode = nullptr;
     m_defaultView = new AbstractViewImpl(this);
     m_defaultView->ref();
     m_listenerTypes = 0;
     m_styleSheets = new StyleSheetListImpl;
     m_styleSheets->ref();
-    m_addedStyleSheets = 0;
+    m_addedStyleSheets = nullptr;
     m_inDocument = true;
     m_styleSelectorDirty = false;
-    m_styleSelector = 0;
+    m_styleSelector = nullptr;
     m_counterDict.setAutoDelete(true);
 
     m_inStyleRecalc = false;
@@ -362,8 +362,8 @@ DocumentImpl::DocumentImpl(DOMImplementationImpl *_implementation, TDEHTMLView *
     m_hadLoadError = false;
     m_docLoading = false;
     m_inSyncLoad = false;
-    m_loadingXMLDoc = 0;
-    m_cssTarget = 0;
+    m_loadingXMLDoc = nullptr;
+    m_cssTarget = nullptr;
     m_dynamicDomRestyler = new tdehtml::DynamicDomRestyler();
 }
 
@@ -385,33 +385,33 @@ void DocumentImpl::removedLastRef()
         // these extra pointers or we will create a reference cycle
         if (m_doctype) {
             m_doctype->deref(); 
-            m_doctype = 0;
+            m_doctype = nullptr;
         }
         
         if (m_cssTarget) {
             m_cssTarget->deref();
-            m_cssTarget = 0;
+            m_cssTarget = nullptr;
         }
 
         if (m_focusNode) {
             m_focusNode->deref();
-            m_focusNode = 0;
+            m_focusNode = nullptr;
         }
 
         if (m_hoverNode) {
             m_hoverNode->deref();
-            m_hoverNode = 0;
+            m_hoverNode = nullptr;
         }
         
         if (m_activeNode) {
             m_activeNode->deref();
-            m_activeNode = 0;
+            m_activeNode = nullptr;
         }
 
         removeChildren();
 
         delete m_tokenizer;
-        m_tokenizer = 0;
+        m_tokenizer = nullptr;
     } else {
         delete this;
     }
@@ -432,7 +432,7 @@ DocumentImpl::~DocumentImpl()
     if (changedDocuments && m_docChanged)
         changedDocuments->remove(this);
     delete m_tokenizer;
-    m_document.resetSkippingRef(0);
+    m_document.resetSkippingRef(nullptr);
     delete m_styleSelector;
     delete m_docLoader;
     if (m_elemSheet )  m_elemSheet->deref();
@@ -487,7 +487,7 @@ ElementImpl *DocumentImpl::createElement( const DOMString &name, int* pException
                    false /* allocate */, false /*HTMLDocumentImpl::createElement looked for HTML elements already*/,
                    pExceptioncode);
     if ( pExceptioncode && *pExceptioncode )
-        return 0;
+        return nullptr;
 
     XMLElementImpl* e = new XMLElementImpl( getDocument(), id );
     e->setHTMLCompat( htmlMode() != XHtml ); // Not a real HTML element, but inside an html-compat doc all tags are uppercase.
@@ -499,8 +499,8 @@ AttrImpl *DocumentImpl::createAttribute( const DOMString &tagName, int* pExcepti
     Id id = getId( NodeImpl::AttributeId, tagName.implementation(),
                   false /* allocate */, isHTMLDocument(), pExceptioncode);
     if ( pExceptioncode && *pExceptioncode )
-        return 0;
-    AttrImpl* attr = new AttrImpl( 0, getDocument(), id, DOMString("").implementation());
+        return nullptr;
+    AttrImpl* attr = new AttrImpl( nullptr, getDocument(), id, DOMString("").implementation());
     attr->setHTMLCompat( htmlMode() != XHtml );
     return attr;
 }
@@ -532,12 +532,12 @@ EntityReferenceImpl *DocumentImpl::createEntityReference ( const DOMString &name
 
 NodeImpl *DocumentImpl::importNode(NodeImpl *importedNode, bool deep, int &exceptioncode)
 {
-    NodeImpl *result = 0;
+    NodeImpl *result = nullptr;
 
     // Not mentioned in spec: throw NOT_FOUND_ERR if evt is null
     if (!importedNode) {
         exceptioncode = DOMException::NOT_FOUND_ERR;
-        return 0;
+        return nullptr;
     }
 
     if(importedNode->nodeType() == Node::ELEMENT_NODE)
@@ -619,13 +619,13 @@ NodeImpl *DocumentImpl::importNode(NodeImpl *importedNode, bool deep, int &excep
 
 ElementImpl *DocumentImpl::createElementNS( const DOMString &_namespaceURI, const DOMString &_qualifiedName, int* pExceptioncode )
 {
-    ElementImpl *e = 0;
+    ElementImpl *e = nullptr;
     int colonPos = -2;
     // check NAMESPACE_ERR/INVALID_CHARACTER_ERR
     if (pExceptioncode && !checkQualifiedName(_qualifiedName, _namespaceURI, &colonPos,
                                               false/*nameCanBeNull*/, false/*nameCanBeEmpty*/,
                                               pExceptioncode))
-        return 0;
+        return nullptr;
     DOMString prefix, localName;
     splitPrefixLocalName(_qualifiedName.implementation(), prefix, localName, colonPos);
 
@@ -639,7 +639,7 @@ ElementImpl *DocumentImpl::createElementNS( const DOMString &_namespaceURI, cons
             if ( _exceptioncode ) {
                  if ( pExceptioncode ) *pExceptioncode = _exceptioncode;
                  delete e;
-                 return 0;
+                 return nullptr;
             }
             e->setHTMLCompat( _namespaceURI.isNull() && htmlMode() != XHtml );
         }
@@ -661,12 +661,12 @@ AttrImpl *DocumentImpl::createAttributeNS( const DOMString &_namespaceURI,
     if (pExceptioncode && !checkQualifiedName(_qualifiedName, _namespaceURI, &colonPos,
                                               false/*nameCanBeNull*/, false/*nameCanBeEmpty*/,
                                               pExceptioncode))
-        return 0;
+        return nullptr;
     DOMString prefix, localName;
     splitPrefixLocalName(_qualifiedName.implementation(), prefix, localName, colonPos);
     Id id = getId(NodeImpl::AttributeId, _namespaceURI.implementation(), prefix.implementation(),
                   localName.implementation(), false, true /*lookupHTML*/);
-    AttrImpl* attr = new AttrImpl(0, getDocument(), id, DOMString("").implementation(),
+    AttrImpl* attr = new AttrImpl(nullptr, getDocument(), id, DOMString("").implementation(),
                          prefix.implementation());
     attr->setHTMLCompat( _namespaceURI.isNull() && htmlMode() != XHtml );
     return attr;
@@ -679,7 +679,7 @@ ElementImpl *DocumentImpl::getElementById( const DOMString &elementId ) const
     ElementMappingCache::ItemInfo* info = m_getElementByIdCache.get(stringKey);
 
     if (!info)
-        return 0;
+        return nullptr;
 
     //See if cache has an unambiguous answer.
     if (info->nd)
@@ -725,7 +725,7 @@ ElementImpl *DocumentImpl::getElementById( const DOMString &elementId ) const
 
     //kdDebug() << "WARNING: *DocumentImpl::getElementById not found " << elementId.string() << endl;
 
-    return 0;
+    return nullptr;
 }
 
 void DocumentImpl::setTitle(const DOMString& _title)
@@ -765,7 +765,7 @@ unsigned short DocumentImpl::nodeType() const
 
 DOMStringImpl* DocumentImpl::textContent() const
 {
-    return 0;
+    return nullptr;
 }
 
 void DocumentImpl::setTextContent( const DOMString&, int& )
@@ -776,7 +776,7 @@ ElementImpl *DocumentImpl::createHTMLElement( const DOMString &name )
     uint id = tdehtml::getTagID( name.string().lower().latin1(), name.string().length() );
 //     id = makeId(xhtmlNamespace, id);
 
-    ElementImpl *n = 0;
+    ElementImpl *n = nullptr;
     switch(id)
     {
     case ID_HTML:
@@ -1077,7 +1077,7 @@ NodeIteratorImpl *DocumentImpl::createNodeIterator(NodeImpl *root, unsigned long
 {
     if (!root) {
         exceptioncode = DOMException::NOT_SUPPORTED_ERR;
-        return 0;
+        return nullptr;
     }
 
     return new NodeIteratorImpl(root,whatToShow,filter,entityReferenceExpansion);
@@ -1088,7 +1088,7 @@ TreeWalkerImpl *DocumentImpl::createTreeWalker(NodeImpl *root, unsigned long wha
 {
     if (!root) {
         exceptioncode = DOMException::NOT_SUPPORTED_ERR;
-        return 0;
+        return nullptr;
     }
 
     return new TreeWalkerImpl( root, whatToShow, filter, entityReferenceExpansion );
@@ -1245,7 +1245,7 @@ void DocumentImpl::attach()
     recalcStyle( Force );
 
     RenderObject* render = m_render;
-    m_render = 0;
+    m_render = nullptr;
 
     NodeBaseImpl::attach();
     m_render = render;
@@ -1256,10 +1256,10 @@ void DocumentImpl::detach()
     RenderObject* render = m_render;
 
     // indicate destruction mode,  i.e. attached() but m_render == 0
-    m_render = 0;
+    m_render = nullptr;
 
     delete m_tokenizer;
-    m_tokenizer = 0;
+    m_tokenizer = nullptr;
 
     // Empty out these lists as a performance optimization
     m_imageLoadEventDispatchSoonList.clear();
@@ -1269,7 +1269,7 @@ void DocumentImpl::detach()
     if ( render )
         render->detach();
 
-    m_view = 0;
+    m_view = nullptr;
 
     m_renderArena.reset();
 }
@@ -1315,7 +1315,7 @@ void DocumentImpl::open( bool clearEventListeners )
         close();
 
     delete m_tokenizer;
-    m_tokenizer = 0;
+    m_tokenizer = nullptr;
 
     TDEHTMLView* view = m_view;
     bool was_attached = attached();
@@ -1324,7 +1324,7 @@ void DocumentImpl::open( bool clearEventListeners )
 
     removeChildren();
     delete m_styleSelector;
-    m_styleSelector = 0;
+    m_styleSelector = nullptr;
     m_view = view;
     if ( was_attached )
         attach();
@@ -1342,10 +1342,10 @@ HTMLElementImpl* DocumentImpl::body()
 {
     NodeImpl *de = documentElement();
     if (!de)
-        return 0;
+        return nullptr;
 
     // try to prefer a FRAMESET element over BODY
-    NodeImpl* body = 0;
+    NodeImpl* body = nullptr;
     for (NodeImpl* i = de->firstChild(); i; i = i->nextSibling()) {
         if (i->id() == ID_FRAMESET)
             return static_cast<HTMLElementImpl*>(i);
@@ -1368,7 +1368,7 @@ void DocumentImpl::close(  )
     // scripts from getting processed.
     if (m_tokenizer && !m_tokenizer->isWaitingForScripts() && !m_tokenizer->isExecutingScript()) {
         delete m_tokenizer;
-        m_tokenizer = 0;
+        m_tokenizer = nullptr;
     }
 
     if (m_view)
@@ -1438,7 +1438,7 @@ NodeImpl *DocumentImpl::nextFocusNode(NodeImpl *fromNode)
 	NodeImpl *n;
 
 	int lowestTabIndex = 65535;
-	for (n = this; n != 0; n = n->traverseNextNode()) {
+	for (n = this; n; n = n->traverseNextNode()) {
 	    if (n->isTabFocusable()) {
 		if ((n->tabIndex() > 0) && (n->tabIndex() < lowestTabIndex))
 		    lowestTabIndex = n->tabIndex();
@@ -1449,12 +1449,12 @@ NodeImpl *DocumentImpl::nextFocusNode(NodeImpl *fromNode)
 	    lowestTabIndex = 0;
 
 	// Go to the first node in the document that has the desired tab index
-	for (n = this; n != 0; n = n->traverseNextNode()) {
+	for (n = this; n; n = n->traverseNextNode()) {
 	    if (n->isTabFocusable() && (n->tabIndex() == lowestTabIndex))
 		return n;
 	}
 
-	return 0;
+	return nullptr;
     }
     else {
 	fromTabIndex = fromNode->tabIndex();
@@ -1476,7 +1476,7 @@ NodeImpl *DocumentImpl::nextFocusNode(NodeImpl *fromNode)
 	NodeImpl *n;
 
 	bool reachedFromNode = false;
-	for (n = this; n != 0; n = n->traverseNextNode()) {
+	for (n = this; n; n = n->traverseNextNode()) {
 	    if (n->isTabFocusable() &&
 		((reachedFromNode && (n->tabIndex() >= fromTabIndex)) ||
 		 (!reachedFromNode && (n->tabIndex() > fromTabIndex))) &&
@@ -1501,7 +1501,7 @@ NodeImpl *DocumentImpl::nextFocusNode(NodeImpl *fromNode)
 	}
 
 	// Search forwards from fromNode
-	for (n = fromNode->traverseNextNode(); n != 0; n = n->traverseNextNode()) {
+	for (n = fromNode->traverseNextNode(); n; n = n->traverseNextNode()) {
 	    if (n->isTabFocusable() && (n->tabIndex() == lowestSuitableTabIndex))
 		return n;
 	}
@@ -1513,7 +1513,7 @@ NodeImpl *DocumentImpl::nextFocusNode(NodeImpl *fromNode)
 	}
 
 	assert(false); // should never get here
-	return 0;
+	return nullptr;
     }
 }
 
@@ -1528,7 +1528,7 @@ NodeImpl *DocumentImpl::previousFocusNode(NodeImpl *fromNode)
 	NodeImpl *n;
 
 	int highestTabIndex = 0;
-	for (n = lastNode; n != 0; n = n->traversePreviousNode()) {
+	for (n = lastNode; n; n = n->traversePreviousNode()) {
 	    if (n->isTabFocusable()) {
 		if (n->tabIndex() == 0)
 		    return n;
@@ -1538,12 +1538,12 @@ NodeImpl *DocumentImpl::previousFocusNode(NodeImpl *fromNode)
 	}
 
 	// No node with a tab index of 0; just go to the last node with the highest tab index
-	for (n = lastNode; n != 0; n = n->traversePreviousNode()) {
+	for (n = lastNode; n; n = n->traversePreviousNode()) {
 	    if (n->isTabFocusable() && (n->tabIndex() == highestTabIndex))
 		return n;
 	}
 
-	return 0;
+	return nullptr;
     }
     else {
 	unsigned short fromTabIndex = fromNode->tabIndex();
@@ -1558,21 +1558,21 @@ NodeImpl *DocumentImpl::previousFocusNode(NodeImpl *fromNode)
 
 	    // No previous nodes with a 0 tab index, go to the last node in the document that has the highest tab index
 	    int highestTabIndex = 0;
-	    for (n = this; n != 0; n = n->traverseNextNode()) {
+	    for (n = this; n; n = n->traverseNextNode()) {
 		if (n->isTabFocusable() && (n->tabIndex() > highestTabIndex))
 		    highestTabIndex = n->tabIndex();
 	    }
 
 	    if (highestTabIndex == 0)
-		return 0;
+		return nullptr;
 
-	    for (n = lastNode; n != 0; n = n->traversePreviousNode()) {
+	    for (n = lastNode; n; n = n->traversePreviousNode()) {
 		if (n->isTabFocusable() && (n->tabIndex() == highestTabIndex))
 		    return n;
 	    }
 
 	    assert(false); // should never get here
-	    return 0;
+	    return nullptr;
 	}
 	else {
 	    // Find the lowest tab index out of all the nodes except fromNode, that is less than or equal to fromNode's
@@ -1583,7 +1583,7 @@ NodeImpl *DocumentImpl::previousFocusNode(NodeImpl *fromNode)
 	    NodeImpl *n;
 
 	    bool reachedFromNode = false;
-	    for (n = this; n != 0; n = n->traverseNextNode()) {
+	    for (n = this; n; n = n->traverseNextNode()) {
 		if (n->isTabFocusable() &&
 		    ((!reachedFromNode && (n->tabIndex() <= fromTabIndex)) ||
 		     (reachedFromNode && (n->tabIndex() < fromTabIndex)))  &&
@@ -1602,11 +1602,11 @@ NodeImpl *DocumentImpl::previousFocusNode(NodeImpl *fromNode)
 	    if (highestSuitableTabIndex == 0) {
 		// No previous node with a tab index. Since the order specified by HTML is nodes with tab index > 0
 		// first, this means that there is no previous node.
-		return 0;
+		return nullptr;
 	    }
 
 	    // Search backwards from fromNode
-	    for (n = fromNode->traversePreviousNode(); n != 0; n = n->traversePreviousNode()) {
+	    for (n = fromNode->traversePreviousNode(); n; n = n->traversePreviousNode()) {
 		if (n->isTabFocusable() && (n->tabIndex() == highestSuitableTabIndex))
 		    return n;
 	    }
@@ -1617,7 +1617,7 @@ NodeImpl *DocumentImpl::previousFocusNode(NodeImpl *fromNode)
 	    }
 
 	    assert(false); // should never get here
-	    return 0;
+	    return nullptr;
 	}
     }
 }
@@ -1626,7 +1626,7 @@ ElementImpl* DocumentImpl::findAccessKeyElement(TQChar c)
 {
     c = c.upper();
     for( NodeImpl* n = this;
-         n != NULL;
+         n;
          n = n->traverseNextNode()) {
         if( n->isElementNode()) {
             ElementImpl* en = static_cast< ElementImpl* >( n );
@@ -1636,7 +1636,7 @@ ElementImpl* DocumentImpl::findAccessKeyElement(TQChar c)
                 return en;
         }
     }
-    return NULL;
+    return nullptr;
 }
 
 int DocumentImpl::nodeAbsIndex(NodeImpl *node)
@@ -1807,7 +1807,7 @@ NodeImpl *DocumentImpl::cloneNode ( bool /*deep*/ )
 {
     // Spec says cloning Document nodes is "implementation dependent"
     // so we do not support it...
-    return 0;
+    return nullptr;
 }
 
 
@@ -1844,7 +1844,7 @@ NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI,
             return emptyNamespace;
         // defaultNamespace handled by "if (!_name) return 0"
         map = m_namespaceMap;
-        lookup = 0;
+        lookup = nullptr;
         break;
     default:
         return 0;
@@ -1857,7 +1857,7 @@ NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI,
     bool cs = true; // case sensitive
     if (_type != NodeImpl::NamespaceId) {
         if (_nsURI)
-            nsid = getId( NodeImpl::NamespaceId, 0, 0, _nsURI, false, false, 0 ) << 16;
+            nsid = getId( NodeImpl::NamespaceId, nullptr, nullptr, _nsURI, false, false, nullptr ) << 16;
 
         // Each document maintains a mapping of tag name -> id for every tag name encountered
         // in the document.
@@ -1922,7 +1922,7 @@ NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI,
 
 NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl *_nodeName, bool readonly, bool lookupHTML, int *pExceptioncode)
 {
-     return getId(_type, 0, 0, _nodeName, readonly, lookupHTML, pExceptioncode);
+     return getId(_type, nullptr, nullptr, _nodeName, readonly, lookupHTML, pExceptioncode);
 }
 
 DOMString DocumentImpl::getName( NodeImpl::IdType _type, NodeImpl::Id _id ) const
@@ -1949,7 +1949,7 @@ DOMString DocumentImpl::getName( NodeImpl::IdType _type, NodeImpl::Id _id ) cons
         if ( _id == defaultNamespace )
             return DOMString();
         map = m_namespaceMap;
-        lookup = 0;
+        lookup = nullptr;
         break;
     default:
         return DOMString();;
@@ -2023,7 +2023,7 @@ void DocumentImpl::removeStyleSheet(StyleSheetImpl *sheet, int *exceptioncode)
         if (m_addedStyleSheets->styleSheets.count() == 0) {
             bool reset = m_addedStyleSheets->hasOneRef();
             m_addedStyleSheets->deref();
-            if (reset) m_addedStyleSheets = 0;
+            if (reset) m_addedStyleSheets = nullptr;
         }
 
         // remove from main list, too
@@ -2078,7 +2078,7 @@ void DocumentImpl::recalcStyleSelector()
         bool canResetSheet = false;
 
         for (n = this; n; n = n->traverseNextNode()) {
-            StyleSheetImpl *sheet = 0;
+            StyleSheetImpl *sheet = nullptr;
 
             if (n->nodeType() == Node::PROCESSING_INSTRUCTION_NODE)
             {
@@ -2119,7 +2119,7 @@ void DocumentImpl::recalcStyleSelector()
                             title = l->getAttribute(ATTR_TITLE).string();
 
 			if ((autoselect || title != sheetUsed) && l->isDisabled()) {
-                            sheet = 0;
+                            sheet = nullptr;
                         } else if (!title.isEmpty() && !l->isAlternate() && sheetUsed.isEmpty()) {
                             sheetUsed = title;
                             l->setDisabled(false);
@@ -2139,7 +2139,7 @@ void DocumentImpl::recalcStyleSelector()
 
                 if ( !title.isEmpty() ) {
                     if ( title != sheetUsed )
-                        sheet = 0; // don't use it
+                        sheet = nullptr; // don't use it
 
                     title = title.replace('&',  "&&");
 
@@ -2396,13 +2396,13 @@ EventImpl *DocumentImpl::createEvent(const DOMString &eventType, int &exceptionc
         return new EventImpl();
     else {
         exceptioncode = DOMException::NOT_SUPPORTED_ERR;
-        return 0;
+        return nullptr;
     }
 }
 
 CSSStyleDeclarationImpl *DocumentImpl::getOverrideStyle(ElementImpl* /*elt*/, DOMStringImpl* /*pseudoElt*/)
 {
-    return 0; // ###
+    return nullptr; // ###
 }
 
 void DocumentImpl::abort()
@@ -2414,7 +2414,7 @@ void DocumentImpl::abort()
 
     if (m_loadingXMLDoc)
 	m_loadingXMLDoc->deref(this);
-    m_loadingXMLDoc = 0;
+    m_loadingXMLDoc = nullptr;
 }
 
 void DocumentImpl::load(const DOMString &uri)
@@ -2473,9 +2473,9 @@ void DocumentImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMString
 	tdeApp->exit_loop();
     }
 
-    assert(m_loadingXMLDoc != 0);
+    assert(m_loadingXMLDoc);
     m_loadingXMLDoc->deref(this);
-    m_loadingXMLDoc = 0;
+    m_loadingXMLDoc = nullptr;
 }
 
 void DocumentImpl::error(int err, const TQString &text)
@@ -2498,9 +2498,9 @@ void DocumentImpl::error(int err, const TQString &text)
     dispatchEvent(evt,exceptioncode,true);
     evt->deref();
 
-    assert(m_loadingXMLDoc != 0);
+    assert(m_loadingXMLDoc);
     m_loadingXMLDoc->deref(this);
-    m_loadingXMLDoc = 0;
+    m_loadingXMLDoc = nullptr;
 }
 
 void DocumentImpl::defaultEventHandler(EventImpl *evt)
@@ -2523,7 +2523,7 @@ void DocumentImpl::defaultEventHandler(EventImpl *evt)
             // currentTarget must be 0 in tdehtml for kjs_events to set "this" correctly.
             // (this is how we identify events dispatched to the window, like window.onmousedown)
             // ## currentTarget is unimplemented in IE, and is "window" in Mozilla (how? not a DOM node)
-            evt->setCurrentTarget(0);
+            evt->setCurrentTarget(nullptr);
             (*it).listener->handleEvent(ev);
 	}
     }
@@ -2556,7 +2556,7 @@ bool DocumentImpl::hasWindowEventListener(int id)
 
 EventListener *DocumentImpl::createHTMLEventListener(const TQString& code, const TQString& name, NodeImpl* node)
 {
-    return part() ? part()->createHTMLEventListener(code, name, node) : 0;
+    return part() ? part()->createHTMLEventListener(code, name, node) : nullptr;
 }
 
 void DocumentImpl::dispatchImageLoadEventSoon(HTMLImageElementImpl *image)
@@ -2621,13 +2621,13 @@ ElementImpl *DocumentImpl::ownerElement() const
 {
     TDEHTMLPart *childPart = part();
     if (!childPart)
-        return 0;
+        return nullptr;
     ChildFrame *childFrame = childPart->d->m_frame;
     if (!childFrame)
-        return 0;
+        return nullptr;
     RenderPart *renderPart = childFrame->m_frame;
     if (!renderPart)
-        return 0;
+        return nullptr;
     return static_cast<ElementImpl *>(renderPart->element());
 }
 
@@ -2667,7 +2667,7 @@ DOMString DocumentImpl::toString() const
 {
     DOMString result;
 
-    for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
+    for (NodeImpl *child = firstChild(); child; child = child->nextSibling()) {
 	result += child->toString();
     }
 
@@ -2678,7 +2678,7 @@ DOMString DocumentImpl::toString() const
 TDEHTMLPart* DOM::DocumentImpl::part() const
 {
     // ### TODO: make this independent from a TDEHTMLView one day.
-    return view() ? view()->part() : 0;
+    return view() ? view()->part() : nullptr;
 }
 
 NodeListImpl::Cache* DOM::DocumentImpl::acquireCachedNodeListInfo(
@@ -2690,7 +2690,7 @@ NodeListImpl::Cache* DOM::DocumentImpl::acquireCachedNodeListInfo(
 
     //Check to see if we have this sort of item cached.
     NodeListImpl::Cache* cached =
-        (type == NodeListImpl::UNCACHEABLE) ? 0 : m_nodeListCache.find(key.hash());
+        (type == NodeListImpl::UNCACHEABLE) ? nullptr : m_nodeListCache.find(key.hash());
 
     if (cached) {
         if (cached->key == key) {
@@ -2763,7 +2763,7 @@ DOMString DocumentFragmentImpl::toString() const
 {
     DOMString result;
 
-    for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
+    for (NodeImpl *child = firstChild(); child; child = child->nextSibling()) {
 	result += child->toString();
     }
 
@@ -2789,8 +2789,8 @@ DocumentTypeImpl::DocumentTypeImpl(DOMImplementationImpl *implementation, Docume
 {
     m_implementation->ref();
 
-    m_entities = 0;
-    m_notations = 0;
+    m_entities = nullptr;
+    m_notations = nullptr;
 
     // if doc is 0, it is not attached to a document and / or
     // therefore does not provide entities or notations. (DOM Level 3)
@@ -2860,12 +2860,12 @@ NodeImpl *DocumentTypeImpl::cloneNode ( bool /*deep*/ )
 {
     // Spec says cloning Document nodes is "implementation dependent"
     // so we do not support it...
-    return 0;
+    return nullptr;
 }
 
 DOMStringImpl* DocumentTypeImpl::textContent() const
 {
-    return 0;
+    return nullptr;
 }
     
 void DocumentTypeImpl::setTextContent( const DOMString&, int& )
diff --git a/tdehtml/xml/dom_docimpl.h b/tdehtml/xml/dom_docimpl.h
index fc78a89b3..3f790ed44 100644
--- a/tdehtml/xml/dom_docimpl.h
+++ b/tdehtml/xml/dom_docimpl.h
@@ -117,8 +117,8 @@ public:
     HTMLDocumentImpl* createHTMLDocument( const DOMString& title);
 
     // Other methods (not part of DOM)
-    DocumentImpl *createDocument( TDEHTMLView *v = 0 );
-    HTMLDocumentImpl *createHTMLDocument( TDEHTMLView *v = 0 );
+    DocumentImpl *createDocument( TDEHTMLView *v = nullptr );
+    HTMLDocumentImpl *createHTMLDocument( TDEHTMLView *v = nullptr );
 
     // Returns the static instance of this class - only one instance of this class should
     // ever be present, and is used as a factory method for creating DocumentImpl objects
@@ -195,8 +195,8 @@ public:
 
     DOMImplementationImpl *implementation() const;
     ElementImpl *documentElement() const;
-    virtual ElementImpl *createElement ( const DOMString &tagName, int* pExceptioncode = 0 );
-    virtual AttrImpl *createAttribute( const DOMString &tagName, int* pExceptioncode = 0 );
+    virtual ElementImpl *createElement ( const DOMString &tagName, int* pExceptioncode = nullptr );
+    virtual AttrImpl *createAttribute( const DOMString &tagName, int* pExceptioncode = nullptr );
     DocumentFragmentImpl *createDocumentFragment ();
     TextImpl *createTextNode ( DOMStringImpl* data ) { return new TextImpl( docPtr(), data); }
     TextImpl *createTextNode ( const TQString& data )
@@ -207,9 +207,9 @@ public:
     EntityReferenceImpl *createEntityReference ( const DOMString &name );
     NodeImpl *importNode( NodeImpl *importedNode, bool deep, int &exceptioncode );
     virtual ElementImpl *createElementNS ( const DOMString &_namespaceURI, const DOMString &_qualifiedName,
-                                           int* pExceptioncode = 0 );
+                                           int* pExceptioncode = nullptr );
     virtual AttrImpl *createAttributeNS( const DOMString &_namespaceURI, const DOMString &_qualifiedName,
-                                           int* pExceptioncode = 0 );
+                                           int* pExceptioncode = nullptr );
     ElementImpl *getElementById ( const DOMString &elementId ) const;
 
     // Actually part of HTMLDocument, but used for giving XML documents a window title as well
@@ -385,9 +385,9 @@ public:
     virtual NodeImpl *cloneNode ( bool deep );
 
     NodeImpl::Id getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI, DOMStringImpl *_localName,
-                        DOMStringImpl *_prefix, bool readonly, bool lookupHTML, int *pExceptioncode = 0);
+                        DOMStringImpl *_prefix, bool readonly, bool lookupHTML, int *pExceptioncode = nullptr);
     NodeImpl::Id getId( NodeImpl::IdType _type, DOMStringImpl *_nodeName, bool readonly, bool lookupHTML,
-                                      int *pExceptioncode = 0);
+                                      int *pExceptioncode = nullptr);
     DOMString getName( NodeImpl::IdType _type, NodeImpl::Id _id ) const;
 
     StyleSheetListImpl* styleSheets() { return m_styleSheets; };
@@ -397,8 +397,8 @@ public:
     void setSelectedStylesheetSet(const DOMString&);
     void setPreferredStylesheetSet(const DOMString& s) { m_preferredStylesheetSet = s; }
 
-    void addStyleSheet(StyleSheetImpl *, int *exceptioncode = 0);
-    void removeStyleSheet(StyleSheetImpl *, int *exceptioncode = 0);
+    void addStyleSheet(StyleSheetImpl *, int *exceptioncode = nullptr);
+    void removeStyleSheet(StyleSheetImpl *, int *exceptioncode = nullptr);
 
     TQStringList availableStyleSheets() const { return m_availableSheets; }
 
diff --git a/tdehtml/xml/dom_elementimpl.cpp b/tdehtml/xml/dom_elementimpl.cpp
index 3941154d7..e904a11b3 100644
--- a/tdehtml/xml/dom_elementimpl.cpp
+++ b/tdehtml/xml/dom_elementimpl.cpp
@@ -190,7 +190,7 @@ void AttrImpl::setNodeValue( const DOMString &v, int &exceptioncode )
 
 NodeImpl *AttrImpl::cloneNode ( bool /*deep*/)
 {
-     AttrImpl* attr = new AttrImpl(0, docPtr(), m_attrId, m_value, m_prefix);
+     AttrImpl* attr = new AttrImpl(nullptr, docPtr(), m_attrId, m_value, m_prefix);
      attr->setHTMLCompat(m_htmlCompat);
      return attr;
 }
@@ -229,7 +229,7 @@ DOMString AttrImpl::toString() const
     if ( firstChild() ) {
 	result += "=\"";
 
-	for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
+	for (NodeImpl *child = firstChild(); child; child = child->nextSibling()) {
 	    result += child->toString();
 	}
 
@@ -256,7 +256,7 @@ DOMStringImpl* AttrImpl::textContent() const
     if (m_value)
         return new DOMStringImpl(m_value->s, m_value->l);
     else
-        return 0;
+        return nullptr;
 }
 
 void AttrImpl::setTextContent( const DOMString &text, int& exceptioncode )
@@ -296,7 +296,7 @@ AttrImpl *AttributeImpl::createAttr(ElementImpl *element, DocumentImpl *docPtr)
 {
     if (m_attrId) {
 	AttrImpl *attr = new AttrImpl(element,docPtr,m_attrId,m_data.value);
-        if (!attr) return 0;
+        if (!attr) return nullptr;
         attr->setHTMLCompat( docPtr->htmlMode() != DocumentImpl::XHtml );
 	m_data.value->deref();
 	m_data.attr = attr;
@@ -313,7 +313,7 @@ void AttributeImpl::free()
 	m_data.value->deref();
     }
     else {
-	m_data.attr->setElement(0);
+	m_data.attr->setElement(nullptr);
 	m_data.attr->deref();
     }
 }
@@ -323,9 +323,9 @@ void AttributeImpl::free()
 ElementImpl::ElementImpl(DocumentImpl *doc)
     : NodeBaseImpl(doc)
 {
-    namedAttrMap = 0;
-    m_styleDecls = 0;
-    m_prefix = 0;
+    namedAttrMap = nullptr;
+    m_styleDecls = nullptr;
+    m_prefix = nullptr;
 }
 
 ElementImpl::~ElementImpl()
@@ -336,8 +336,8 @@ ElementImpl::~ElementImpl()
     }
 
     if (m_styleDecls) {
-        m_styleDecls->setNode(0);
-        m_styleDecls->setParent(0);
+        m_styleDecls->setNode(nullptr);
+        m_styleDecls->setParent(nullptr);
         m_styleDecls->deref();
     }
 
@@ -353,7 +353,7 @@ unsigned short ElementImpl::nodeType() const
 DOMStringImpl* ElementImpl::getAttributeImpl( NodeImpl::Id id, bool nsAware, DOMStringImpl* qName) const
 {
     if (!namedAttrMap)
-	return 0;
+	return nullptr;
 
     DOMStringImpl *value = namedAttrMap->getValue(id, nsAware, qName);
     if (value)
@@ -361,11 +361,11 @@ DOMStringImpl* ElementImpl::getAttributeImpl( NodeImpl::Id id, bool nsAware, DOM
 
     // then search in default attr in case it is not yet set
     NamedAttrMapImpl* dm = defaultMap();
-    value = dm ? dm->getValue(id, nsAware, qName) : 0;
+    value = dm ? dm->getValue(id, nsAware, qName) : nullptr;
     if (value)
 	return value;
 
-    return 0;
+    return nullptr;
 }
 
 DOMString ElementImpl::getAttribute( NodeImpl::Id id, bool nsAware, const DOMString& qName) const
@@ -380,7 +380,7 @@ void ElementImpl::setAttribute(NodeImpl::Id id, const DOMString &value, const DO
         exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
         return;
     }
-    attributes()->setValue(id, value.implementation(), (qName.isEmpty() ? 0: qName.implementation()));
+    attributes()->setValue(id, value.implementation(), (qName.isEmpty() ? nullptr: qName.implementation()));
 }
 
 void ElementImpl::setAttributeNS( const DOMString &namespaceURI, const DOMString &qualifiedName,
@@ -400,7 +400,7 @@ void ElementImpl::setAttributeNS( const DOMString &namespaceURI, const DOMString
     splitPrefixLocalName(qualifiedName.implementation(), prefix, localName, colonPos);
     NodeImpl::Id id = getDocument()->getId(AttributeId, namespaceURI.implementation(),
                             prefix.implementation(), localName.implementation(), false, true /*lookupHTML*/);
-    attributes()->setValue(id, value.implementation(), 0, prefix.implementation(),
+    attributes()->setValue(id, value.implementation(), nullptr, prefix.implementation(),
                            true /*nsAware*/, !namespaceURI.isNull() /*hasNS*/);
 }
 
@@ -414,8 +414,8 @@ void ElementImpl::setAttributeMap( NamedAttrMapImpl* list )
 {
     // If setting the whole map changes the id attribute, we need to
     // call updateId.
-    DOMStringImpl *oldId = namedAttrMap ? namedAttrMap->getValue(ATTR_ID) : 0;
-    DOMStringImpl *newId = list ? list->getValue(ATTR_ID) : 0;
+    DOMStringImpl *oldId = namedAttrMap ? namedAttrMap->getValue(ATTR_ID) : nullptr;
+    DOMStringImpl *newId = list ? list->getValue(ATTR_ID) : nullptr;
 
     if (oldId || newId) {
        updateId(oldId, newId);
@@ -430,7 +430,7 @@ void ElementImpl::setAttributeMap( NamedAttrMapImpl* list )
 
     if (namedAttrMap) {
         namedAttrMap->ref();
-        assert(namedAttrMap->m_element == 0);
+        assert(!namedAttrMap->m_element);
         namedAttrMap->setElement(this);
         unsigned long len = namedAttrMap->length();
         for (unsigned long i = 0; i < len; i++) {
@@ -447,7 +447,7 @@ NodeImpl *ElementImpl::cloneNode(bool deep)
         clone = getDocument()->createElementNS( namespaceURI(), nodeName() );
     else
         clone = getDocument()->createElement( nodeName() );
-    if (!clone) return 0;
+    if (!clone) return nullptr;
     finishCloneNode( clone, deep );
     return clone;
 }
@@ -507,7 +507,7 @@ void ElementImpl::createAttributeMap() const
 
 NamedAttrMapImpl* ElementImpl::defaultMap() const
 {
-    return 0;
+    return nullptr;
 }
 
 RenderStyle *ElementImpl::styleForRenderer(RenderObject * /*parentRenderer*/)
@@ -599,7 +599,7 @@ void ElementImpl::attributeChanged(NodeImpl::Id id)
 void ElementImpl::recalcStyle( StyleChange change )
 {
     // ### should go away and be done in renderobject
-    RenderStyle* _style = m_render ? m_render->style() : 0;
+    RenderStyle* _style = m_render ? m_render->style() : nullptr;
     bool hasParentRenderer = parent() ? parent()->attached() : false;
 
 #if 0
@@ -707,7 +707,7 @@ void ElementImpl::scrollIntoView(bool /*alignToTop*/)
 
 void ElementImpl::createDecl( )
 {
-    m_styleDecls = new CSSStyleDeclarationImpl(0);
+    m_styleDecls = new CSSStyleDeclarationImpl(nullptr);
     m_styleDecls->ref();
     m_styleDecls->setParent(getDocument()->elementSheet());
     m_styleDecls->setNode(this);
@@ -764,7 +764,7 @@ void ElementImpl::insertedIntoDocument()
 
     if (hasID()) {
         DOMString id = getAttribute(ATTR_ID);
-        updateId(0, id.implementation());
+        updateId(nullptr, id.implementation());
     }
 }
 
@@ -772,7 +772,7 @@ void ElementImpl::removedFromDocument()
 {
     if (hasID()) {
         DOMString id = getAttribute(ATTR_ID);
-        updateId(id.implementation(), 0);
+        updateId(id.implementation(), nullptr);
     }
 
     NodeBaseImpl::removedFromDocument();
@@ -829,7 +829,7 @@ DOMString ElementImpl::selectionToString(NodeImpl *selectionStart, NodeImpl *sel
     if (hasChildNodes()) {
 	result += ">";
 
-	for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
+	for (NodeImpl *child = firstChild(); child; child = child->nextSibling()) {
 	    result += child->selectionToString(selectionStart, selectionEnd, startOffset, endOffset, found); // this might set found to true
 	    if(child == selectionEnd)
 	        found = true;
@@ -853,7 +853,7 @@ DOMString ElementImpl::toString() const
     if (hasChildNodes()) {
 	result += ">";
 
-	for (NodeImpl *child = firstChild(); child != NULL; child = child->nextSibling()) {
+	for (NodeImpl *child = firstChild(); child; child = child->nextSibling()) {
 	    DOMString kid = child->toString();
 	    result += TQConstString(kid.unicode(), kid.length()).string();
 	}
@@ -956,7 +956,7 @@ NodeImpl *XMLElementImpl::cloneNode ( bool deep )
 
 NamedAttrMapImpl::NamedAttrMapImpl(ElementImpl *element)
   : m_element(element),
-    m_attrs(0),
+    m_attrs(nullptr),
     m_attrCount(0)
 {
 }
@@ -971,7 +971,7 @@ NamedAttrMapImpl::~NamedAttrMapImpl()
 NodeImpl *NamedAttrMapImpl::getNamedItem ( NodeImpl::Id id, bool nsAware, DOMStringImpl* qName ) const
 {
     if (!m_element)
-	return 0;
+	return nullptr;
     unsigned int mask = nsAware ? ~0L : NodeImpl_IdLocalMask;
     id = (id & mask);
 
@@ -985,20 +985,20 @@ NodeImpl *NamedAttrMapImpl::getNamedItem ( NodeImpl::Id id, bool nsAware, DOMStr
         }
     }
 
-    return 0;
+    return nullptr;
 }
 
 Node NamedAttrMapImpl::removeNamedItem ( NodeImpl::Id id, bool nsAware, DOMStringImpl* qName, int &exceptioncode )
 {
     if (!m_element) {
         exceptioncode = DOMException::NOT_FOUND_ERR;
-        return 0;
+        return nullptr;
     }
 
     // NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly
     if (isReadOnly()) {
         exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
-        return 0;
+        return nullptr;
     }
     unsigned int mask = nsAware ? ~0L : NodeImpl_IdLocalMask;
     id = (id & mask);
@@ -1011,13 +1011,13 @@ Node NamedAttrMapImpl::removeNamedItem ( NodeImpl::Id id, bool nsAware, DOMStrin
                 continue;
 	    id = m_attrs[i].id();
 	    if (id == ATTR_ID)
-	       m_element->updateId(m_attrs[i].val(), 0);
+	       m_element->updateId(m_attrs[i].val(), nullptr);
 	    Node removed(m_attrs[i].createAttr(m_element,m_element->docPtr()));
 	    m_attrs[i].free();
 	    memmove(m_attrs+i,m_attrs+i+1,(m_attrCount-i-1)*sizeof(AttributeImpl));
 	    m_attrCount--;
 	    m_attrs = (AttributeImpl*)realloc(m_attrs,m_attrCount*sizeof(AttributeImpl));
-	    m_element->parseAttribute(id,0);
+	    m_element->parseAttribute(id,nullptr);
 	    m_element->attributeChanged(id);
 	    return removed;
 	}
@@ -1026,32 +1026,32 @@ Node NamedAttrMapImpl::removeNamedItem ( NodeImpl::Id id, bool nsAware, DOMStrin
     // NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI
     // and localName in this map.
     exceptioncode = DOMException::NOT_FOUND_ERR;
-    return 0;
+    return nullptr;
 }
 
 Node NamedAttrMapImpl::setNamedItem ( NodeImpl* arg, bool nsAware, DOMStringImpl* qName, int &exceptioncode )
 {
     if (!m_element) {
         exceptioncode = DOMException::NOT_FOUND_ERR;
-        return 0;
+        return nullptr;
     }
 
     // NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
     if (isReadOnly()) {
         exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
-        return 0;
+        return nullptr;
     }
 
     // WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
     if (arg->getDocument() != m_element->getDocument()) {
         exceptioncode = DOMException::WRONG_DOCUMENT_ERR;
-        return 0;
+        return nullptr;
     }
 
     // HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap
     if (!arg->isAttributeNode()) {
         exceptioncode = DOMException::HIERARCHY_REQUEST_ERR;
-        return 0;
+        return nullptr;
     }
     AttrImpl *attr = static_cast<AttrImpl*>(arg);
 
@@ -1059,7 +1059,7 @@ Node NamedAttrMapImpl::setNamedItem ( NodeImpl* arg, bool nsAware, DOMStringImpl
     // The DOM user must explicitly clone Attr nodes to re-use them in other elements.
     if (attr->ownerElement() && attr->ownerElement() != m_element) {
         exceptioncode = DOMException::INUSE_ATTRIBUTE_ERR;
-        return 0;
+        return nullptr;
     }
 
     if (attr->ownerElement() == m_element) {
@@ -1101,21 +1101,21 @@ Node NamedAttrMapImpl::setNamedItem ( NodeImpl* arg, bool nsAware, DOMStringImpl
     m_attrs[m_attrCount-1].m_data.attr->ref();
     attr->setElement(m_element);
     if (id == ATTR_ID)
-        m_element->updateId(0, attr->val());
+        m_element->updateId(nullptr, attr->val());
     m_element->parseAttribute(&m_attrs[m_attrCount-1]);
     m_element->attributeChanged(m_attrs[m_attrCount-1].id());
     // ### dispatch mutation events
 
-    return 0;
+    return nullptr;
 }
 
 NodeImpl *NamedAttrMapImpl::item ( unsigned long index ) const
 {
     if (!m_element)
-	return 0;
+	return nullptr;
 
     if (index >= m_attrCount)
-	return 0;
+	return nullptr;
     else
 	return m_attrs[index].createAttr(m_element,m_element->docPtr());
 }
@@ -1152,7 +1152,7 @@ DOMStringImpl *NamedAttrMapImpl::getValue(NodeImpl::Id id, bool nsAware, DOMStri
                 continue;
             return m_attrs[i].val();
         }
-    return 0;
+    return nullptr;
 }
 
 void NamedAttrMapImpl::setValue(NodeImpl::Id id, DOMStringImpl *value, DOMStringImpl* qName,
@@ -1209,7 +1209,7 @@ void NamedAttrMapImpl::setValue(NodeImpl::Id id, DOMStringImpl *value, DOMString
     }
     if (m_element) {
 	if (id == ATTR_ID)
-	    m_element->updateId(0, value);
+	    m_element->updateId(nullptr, value);
 	m_element->parseAttribute(&m_attrs[m_attrCount-1]);
 	m_element->attributeChanged(m_attrs[m_attrCount-1].id());
     }
@@ -1222,20 +1222,20 @@ Attr NamedAttrMapImpl::removeAttr(AttrImpl *attr)
 	if (m_attrs[i].attr() == attr) {
 	    NodeImpl::Id id = m_attrs[i].id();
 	    if (id == ATTR_ID)
-	        m_element->updateId(attr->val(), 0);
+	        m_element->updateId(attr->val(), nullptr);
 	    Node removed(m_attrs[i].createAttr(m_element,m_element->docPtr()));
 	    m_attrs[i].free();
 	    memmove(m_attrs+i,m_attrs+i+1,(m_attrCount-i-1)*sizeof(AttributeImpl));
 	    m_attrCount--;
 	    m_attrs = (AttributeImpl*)realloc(m_attrs,m_attrCount*sizeof(AttributeImpl));
-	    m_element->parseAttribute(id,0);
+	    m_element->parseAttribute(id,nullptr);
 	    m_element->attributeChanged(id);
 	    // ### dispatch mutation events
 	    return removed;
 	}
     }
 
-    return 0;
+    return nullptr;
 }
 
 NodeImpl::Id NamedAttrMapImpl::mapId(DOMStringImpl* namespaceURI,
@@ -1244,7 +1244,7 @@ NodeImpl::Id NamedAttrMapImpl::mapId(DOMStringImpl* namespaceURI,
     if (!m_element)
 	return 0;
 
-    return m_element->getDocument()->getId(NodeImpl::AttributeId, namespaceURI, 0, localName, readonly,
+    return m_element->getDocument()->getId(NodeImpl::AttributeId, namespaceURI, nullptr, localName, readonly,
                                            true /*lookupHTML*/);
 }
 
@@ -1254,7 +1254,7 @@ void NamedAttrMapImpl::copyAttributes(NamedAttrMapImpl *other)
     unsigned long i;
     for (i = 0; i < m_attrCount; i++) {
         if (m_attrs[i].id() == ATTR_ID)
-            m_element->updateId(m_attrs[i].val(), 0);
+            m_element->updateId(m_attrs[i].val(), nullptr);
 	m_attrs[i].free();
     }
     m_attrCount = other->m_attrCount;
@@ -1271,7 +1271,7 @@ void NamedAttrMapImpl::copyAttributes(NamedAttrMapImpl *other)
 	    m_attrs[i].m_data.attr->setElement(m_element);
 	}
 	if (m_attrs[i].id() == ATTR_ID)
-	   m_element->updateId(0, m_attrs[i].val());
+	   m_element->updateId(nullptr, m_attrs[i].val());
 	m_element->parseAttribute(&m_attrs[i]);
 	m_element->attributeChanged(m_attrs[i].id());
     }
@@ -1292,10 +1292,10 @@ void NamedAttrMapImpl::detachFromElement()
     // This makes the map invalid; nothing can really be done with it now since it's not
     // associated with an element. But we have to keep it around in memory in case there
     // are still references to it.
-    m_element = 0;
+    m_element = nullptr;
     for (unsigned long i = 0; i < m_attrCount; i++)
 	m_attrs[i].free();
     free(m_attrs);
-    m_attrs = 0;
+    m_attrs = nullptr;
     m_attrCount = 0;
 }
diff --git a/tdehtml/xml/dom_elementimpl.h b/tdehtml/xml/dom_elementimpl.h
index 306c4f30b..537dec7cf 100644
--- a/tdehtml/xml/dom_elementimpl.h
+++ b/tdehtml/xml/dom_elementimpl.h
@@ -54,7 +54,7 @@ class AttrImpl : public NodeBaseImpl
 
 public:
     AttrImpl(ElementImpl* element, DocumentImpl* docPtr, NodeImpl::Id attrId,
-	     DOMStringImpl *value, DOMStringImpl *prefix = 0);
+	     DOMStringImpl *value, DOMStringImpl *prefix = nullptr);
     ~AttrImpl();
 
 private:
@@ -118,7 +118,7 @@ struct AttributeImpl
     NodeImpl::Id id() const { return m_attrId ? m_attrId : m_data.attr->id(); }
     DOMStringImpl *val() const { return m_attrId ? m_data.value : m_data.attr->val(); }
     DOMString value() const { return val(); }
-    AttrImpl *attr() const { return m_attrId ? 0 : m_data.attr; }
+    AttrImpl *attr() const { return m_attrId ? nullptr : m_data.attr; }
     DOMString namespaceURI() { return m_attrId ? DOMString() : m_data.attr->namespaceURI(); }
     DOMString prefix() { return m_attrId ? DOMString() : m_data.attr->prefix(); }
     DOMString localName() { return m_attrId ? DOMString() : m_data.attr->localName(); }
@@ -147,7 +147,7 @@ public:
     ~ElementImpl();
 
     DOMString getAttribute( NodeImpl::Id id, bool nsAware = 0, const DOMString& qName = DOMString() ) const;
-    DOMStringImpl* getAttributeImpl( NodeImpl::Id id, bool nsAware = 0, DOMStringImpl* qName = 0 ) const;
+    DOMStringImpl* getAttributeImpl( NodeImpl::Id id, bool nsAware = 0, DOMStringImpl* qName = nullptr ) const;
     void setAttribute( NodeImpl::Id id, const DOMString &value, const DOMString &qName,
                        int &exceptioncode );
     void setAttributeNS( const DOMString &namespaceURI, const DOMString &qualifiedName,
@@ -291,7 +291,7 @@ public:
     virtual ~NamedAttrMapImpl();
 
     // DOM methods & attributes for NamedNodeMap
-    virtual NodeImpl *getNamedItem ( NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = 0 ) const;
+    virtual NodeImpl *getNamedItem ( NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = nullptr ) const;
     virtual Node removeNamedItem ( NodeImpl::Id id, bool nsAware, DOMStringImpl* qName, int &exceptioncode );
     virtual Node setNamedItem ( NodeImpl* arg, bool nsAware, DOMStringImpl* qName, int &exceptioncode );
 
@@ -305,9 +305,9 @@ public:
     // ### replace idAt and getValueAt with attrAt
     NodeImpl::Id idAt(unsigned long index) const;
     DOMStringImpl *valueAt(unsigned long index) const;
-    DOMStringImpl *getValue(NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = 0) const;
-    void setValue(NodeImpl::Id id, DOMStringImpl *value, DOMStringImpl* qName = 0,
-                  DOMStringImpl *prefix = 0, bool nsAware = false, bool hasNS = false);
+    DOMStringImpl *getValue(NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = nullptr) const;
+    void setValue(NodeImpl::Id id, DOMStringImpl *value, DOMStringImpl* qName = nullptr,
+                  DOMStringImpl *prefix = nullptr, bool nsAware = false, bool hasNS = false);
     Attr removeAttr(AttrImpl *attr);
     NodeImpl::Id mapId(DOMStringImpl* namespaceURI, DOMStringImpl* localName, bool readonly);
     void copyAttributes(NamedAttrMapImpl *other);
diff --git a/tdehtml/xml/dom_nodeimpl.cpp b/tdehtml/xml/dom_nodeimpl.cpp
index c8525fbcc..9351f1b71 100644
--- a/tdehtml/xml/dom_nodeimpl.cpp
+++ b/tdehtml/xml/dom_nodeimpl.cpp
@@ -56,9 +56,9 @@ using namespace tdehtml;
 
 NodeImpl::NodeImpl(DocumentImpl *doc)
     : m_document(doc),
-      m_previous(0),
-      m_next(0),
-      m_render(0),
+      m_previous(nullptr),
+      m_next(nullptr),
+      m_render(nullptr),
       m_tabIndex( 0 ),
       m_hasId( false ),
       m_attached(false),
@@ -84,9 +84,9 @@ NodeImpl::~NodeImpl()
     if (m_render)
         detach();
     if (m_previous)
-        m_previous->setNextSibling(0);
+        m_previous->setNextSibling(nullptr);
     if (m_next)
-        m_next->setPreviousSibling(0);
+        m_next->setPreviousSibling(nullptr);
 }
 
 DOMString NodeImpl::nodeValue() const
@@ -119,18 +119,18 @@ NodeListImpl *NodeImpl::childNodes()
 
 NodeImpl *NodeImpl::firstChild() const
 {
-  return 0;
+  return nullptr;
 }
 
 NodeImpl *NodeImpl::lastChild() const
 {
-  return 0;
+  return nullptr;
 }
 
 NodeImpl *NodeImpl::insertBefore( NodeImpl *, NodeImpl *, int &exceptioncode )
 {
     exceptioncode = DOMException::HIERARCHY_REQUEST_ERR;
-    return 0;
+    return nullptr;
 }
 
 void NodeImpl::replaceChild( NodeImpl *, NodeImpl *, int &exceptioncode )
@@ -146,7 +146,7 @@ void NodeImpl::removeChild( NodeImpl *, int &exceptioncode )
 NodeImpl *NodeImpl::appendChild( NodeImpl *, int &exceptioncode )
 {
   exceptioncode = DOMException::HIERARCHY_REQUEST_ERR;
-  return 0;
+  return nullptr;
 }
 
 bool NodeImpl::hasChildNodes(  ) const
@@ -219,7 +219,7 @@ void NodeImpl::setLastChild(NodeImpl *)
 
 NodeImpl *NodeImpl::addChild(NodeImpl *)
 {
-  return 0;
+  return nullptr;
 }
 
 void NodeImpl::getCaret(int offset, bool override, int &_x, int &_y, int &width, int &height)
@@ -370,7 +370,7 @@ void NodeImpl::dispatchGenericEvent( EventImpl *evt, int &/*exceptioncode */)
 
     // dispatch to the actual target node
     it.toLast();
-    NodeImpl* propagationSentinel = 0;
+    NodeImpl* propagationSentinel = nullptr;
     if (!evt->propagationStopped()) {
         evt->setEventPhase(Event::AT_TARGET);
         evt->setCurrentTarget(it.current());
@@ -391,7 +391,7 @@ void NodeImpl::dispatchGenericEvent( EventImpl *evt, int &/*exceptioncode */)
         }
 
         // now we call all default event handlers (this is not part of DOM - it is internal to tdehtml)
-        evt->setCurrentTarget(0);
+        evt->setCurrentTarget(nullptr);
         evt->setEventPhase(0); // I guess this is correct, the spec does not seem to say
         for (it.toLast(); it.current() && it.current() != propagationSentinel &&
                  !evt->defaultPrevented() && !evt->defaultHandled(); --it)
@@ -430,7 +430,7 @@ void NodeImpl::dispatchWindowEvent(int _id, bool canBubbleArg, bool cancelableAr
 {
     int exceptioncode = 0;
     EventImpl* const evt = new EventImpl(static_cast<EventImpl::EventId>(_id),canBubbleArg,cancelableArg);
-    evt->setTarget( 0 );
+    evt->setTarget( nullptr );
     evt->ref();
     DocumentImpl *doc = getDocument();
     doc->ref();
@@ -527,7 +527,7 @@ void NodeImpl::dispatchMouseEvent(TQMouseEvent *_mouse, int overrideId, int over
 
     EventImpl* const evt = new MouseEventImpl(evtId,true,cancelable,getDocument()->defaultView(),
                    detail,screenX,screenY,clientX,clientY,pageX,pageY,ctrlKey,altKey,shiftKey,metaKey,
-                   button,0);
+                   button,nullptr);
     evt->ref();
     dispatchEvent(evt,exceptioncode,true);
     evt->deref();
@@ -559,7 +559,7 @@ void NodeImpl::dispatchSubtreeModifiedEvent()
         return;
     int exceptioncode = 0;
     MutationEventImpl* const evt = new MutationEventImpl(EventImpl::DOMSUBTREEMODIFIED_EVENT,true,
-                                                         false,0,DOMString(),DOMString(),DOMString(),0);
+                                                         false,nullptr,DOMString(),DOMString(),DOMString(),0);
     evt->ref();
     dispatchEvent(evt,exceptioncode,true);
     evt->deref();
@@ -629,7 +629,7 @@ unsigned long NodeImpl::childNodeCount()
 
 NodeImpl *NodeImpl::childNode(unsigned long /*index*/)
 {
-    return 0;
+    return nullptr;
 }
 
 NodeImpl *NodeImpl::traverseNextNode(NodeImpl *stayWithin) const
@@ -645,7 +645,7 @@ NodeImpl *NodeImpl::traverseNextNode(NodeImpl *stayWithin) const
 	if (n)
 	    return n->nextSibling();
     }
-    return 0;
+    return nullptr;
 }
 
 NodeImpl *NodeImpl::traversePreviousNode() const
@@ -660,7 +660,7 @@ NodeImpl *NodeImpl::traversePreviousNode() const
         return parentNode();
     }
     else {
-        return 0;
+        return nullptr;
     }
 }
 
@@ -808,8 +808,8 @@ NodeImpl::StyleChange NodeImpl::diff( tdehtml::RenderStyle *s1, tdehtml::RenderS
 
 bool NodeImpl::pseudoDiff( tdehtml::RenderStyle *s1, tdehtml::RenderStyle *s2, unsigned int pid)
 {
-    tdehtml::RenderStyle *ps1 = s1 ? s1->getPseudoStyle((tdehtml::RenderStyle::PseudoId)pid) : 0;
-    tdehtml::RenderStyle *ps2 = s2 ? s2->getPseudoStyle((tdehtml::RenderStyle::PseudoId)pid) : 0;
+    tdehtml::RenderStyle *ps1 = s1 ? s1->getPseudoStyle((tdehtml::RenderStyle::PseudoId)pid) : nullptr;
+    tdehtml::RenderStyle *ps2 = s2 ? s2->getPseudoStyle((tdehtml::RenderStyle::PseudoId)pid) : nullptr;
 
     if (ps1 == ps2)
         return false;
@@ -850,7 +850,7 @@ void NodeImpl::detach()
     if ( m_render )
         m_render->detach();
 
-    m_render = 0;
+    m_render = nullptr;
     getDocument()->incDOMTreeVersion();
     m_attached = false;
 }
@@ -904,7 +904,7 @@ RenderObject * NodeImpl::previousRenderer()
         if (n->renderer())
             return n->renderer();
     }
-    return 0;
+    return nullptr;
 }
 
 RenderObject * NodeImpl::nextRenderer()
@@ -913,7 +913,7 @@ RenderObject * NodeImpl::nextRenderer()
         if (n->renderer())
             return n->renderer();
     }
-    return 0;
+    return nullptr;
 }
 
 void NodeImpl::createRendererIfNeeded()
@@ -954,7 +954,7 @@ bool NodeImpl::rendererIsNeeded(RenderStyle *style)
 RenderObject *NodeImpl::createRenderer(RenderArena* /*arena*/, RenderStyle* /*style*/)
 {
     assert(false);
-    return 0;
+    return nullptr;
 }
 
 bool NodeImpl::contentEditable() const
@@ -980,7 +980,7 @@ long NodeImpl::maxOffset() const
 DOMStringImpl* NodeImpl::textContent() const
 {
   TQString out;
-  for (NodeImpl *child = firstChild(); child != 0; child = child->nextSibling()) {
+  for (NodeImpl *child = firstChild(); child; child = child->nextSibling()) {
     short type = child->nodeType();
     if (type != Node::COMMENT_NODE && type != Node::PROCESSING_INSTRUCTION_NODE) {
       DOMStringImpl* kidText = child->textContent();
@@ -1001,11 +1001,11 @@ NodeBaseImpl::~NodeBaseImpl()
     NodeImpl *n;
     NodeImpl *next;
 
-    for( n = _first; n != 0; n = next ) {
+    for( n = _first; n; n = next ) {
         next = n->nextSibling();
-        n->setPreviousSibling(0);
-        n->setNextSibling(0);
-        n->setParent(0);
+        n->setPreviousSibling(nullptr);
+        n->setNextSibling(nullptr);
+        n->setParent(nullptr);
 	if ( !n->refCount() )
             delete n;
     }
@@ -1033,12 +1033,12 @@ NodeImpl *NodeBaseImpl::insertBefore ( NodeImpl *newChild, NodeImpl *refChild, i
     // Make sure adding the new child is ok
     checkAddChild(newChild, exceptioncode);
     if (exceptioncode)
-        return 0;
+        return nullptr;
 
     // NOT_FOUND_ERR: Raised if refChild is not a child of this node
     if (refChild->parentNode() != this) {
         exceptioncode = DOMException::NOT_FOUND_ERR;
-        return 0;
+        return nullptr;
     }
 
     bool isFragment = newChild->nodeType() == Node::DOCUMENT_FRAGMENT_NODE;
@@ -1057,7 +1057,7 @@ NodeImpl *NodeBaseImpl::insertBefore ( NodeImpl *newChild, NodeImpl *refChild, i
 	return newChild;
 
     while (child) {
-        nextChild = isFragment ? child->nextSibling() : 0;
+        nextChild = isFragment ? child->nextSibling() : nullptr;
 
         // If child is already present in the tree, first remove it
         NodeImpl *newParent = child->parentNode();
@@ -1068,7 +1068,7 @@ NodeImpl *NodeBaseImpl::insertBefore ( NodeImpl *newChild, NodeImpl *refChild, i
         if(newParent)
             newParent->removeChild( child, exceptioncode );
         if ( exceptioncode )
-            return 0;
+            return nullptr;
 
         // Add child in the correct position
         if (prev)
@@ -1132,7 +1132,7 @@ void NodeBaseImpl::replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &e
 
     // Add the new child(ren)
     while (child) {
-        nextChild = isFragment ? child->nextSibling() : 0;
+        nextChild = isFragment ? child->nextSibling() : nullptr;
 
         // If child is already present in the tree, first remove it
         NodeImpl *newParent = child->parentNode();
@@ -1211,9 +1211,9 @@ void NodeBaseImpl::removeChild ( NodeImpl *oldChild, int &exceptioncode )
     if(_first == oldChild) _first = next;
     if(_last == oldChild) _last = prev;
 
-    oldChild->setPreviousSibling(0);
-    oldChild->setNextSibling(0);
-    oldChild->setParent(0);
+    oldChild->setPreviousSibling(nullptr);
+    oldChild->setNextSibling(nullptr);
+    oldChild->setParent(nullptr);
 
     structureChanged();
 
@@ -1233,14 +1233,14 @@ void NodeBaseImpl::removeChildren()
 {
     bool inDoc = inDocument();
     NodeImpl *n, *next;
-    for( n = _first, _first = 0; n; n = next )
+    for( n = _first, _first = nullptr; n; n = next )
     {
         next = n->nextSibling();
         if (n->attached())
 	    n->detach();
-        n->setPreviousSibling(0);
-        n->setNextSibling(0);
-        n->setParent(0);
+        n->setPreviousSibling(nullptr);
+        n->setNextSibling(nullptr);
+        n->setParent(nullptr);
 
         if ( inDoc )
             for ( NodeImpl* c = n; c; c = c->traverseNextNode( n ) )
@@ -1249,7 +1249,7 @@ void NodeBaseImpl::removeChildren()
         if( !n->refCount() )
             delete n;
     }
-    _last = 0;
+    _last = nullptr;
 }
 
 
@@ -1260,7 +1260,7 @@ NodeImpl *NodeBaseImpl::appendChild ( NodeImpl *newChild, int &exceptioncode )
     // Make sure adding the new child is ok
     checkAddChild(newChild, exceptioncode);
     if (exceptioncode)
-        return 0;
+        return nullptr;
 
     if ( newChild == _last ) // nothing to do
 	return newChild;
@@ -1277,7 +1277,7 @@ NodeImpl *NodeBaseImpl::appendChild ( NodeImpl *newChild, int &exceptioncode )
     NodeImpl *child = isFragment ? newChild->firstChild() : newChild;
 
     while (child) {
-        nextChild = isFragment ? child->nextSibling() : 0;
+        nextChild = isFragment ? child->nextSibling() : nullptr;
 
         // If child is already present in the tree, first remove it
         NodeImpl *oldParent = child->parentNode();
@@ -1285,7 +1285,7 @@ NodeImpl *NodeBaseImpl::appendChild ( NodeImpl *newChild, int &exceptioncode )
         if(oldParent) {
             oldParent->removeChild( child, exceptioncode );
             if (exceptioncode)
-                return 0;
+                return nullptr;
         }
 
         // Append child to the end of the list
@@ -1322,7 +1322,7 @@ NodeImpl *NodeBaseImpl::appendChild ( NodeImpl *newChild, int &exceptioncode )
 
 bool NodeBaseImpl::hasChildNodes (  ) const
 {
-    return _first != 0;
+    return _first != nullptr;
 }
 
 // not part of the DOM
@@ -1368,7 +1368,7 @@ NodeImpl *NodeBaseImpl::addChild(NodeImpl *newChild)
     if(getDocument()->isHTMLDocument() && !childAllowed(newChild))
     {
         //kdDebug( 6020 ) << "AddChild failed! id=" << id() << ", child->id=" << newChild->id() << endl;
-        return 0;
+        return nullptr;
     }
 
     // just add it...
@@ -1397,7 +1397,7 @@ NodeImpl *NodeBaseImpl::addChild(NodeImpl *newChild)
 void NodeBaseImpl::attach()
 {
     NodeImpl *child = _first;
-    while(child != 0)
+    while(child)
     {
         child->attach();
         child = child->nextSibling();
@@ -1408,7 +1408,7 @@ void NodeBaseImpl::attach()
 void NodeBaseImpl::detach()
 {
     NodeImpl *child = _first;
-    while(child != 0)
+    while(child)
     {
         NodeImpl* prev = child;
         child = child->nextSibling();
@@ -1447,7 +1447,7 @@ bool NodeBaseImpl::getUpperLeftCorner(int &xPos, int &yPos) const
         else if(o->nextSibling())
             o = o->nextSibling();
         else {
-            RenderObject *next = 0;
+            RenderObject *next = nullptr;
             while(!next) {
                 o = o->parent();
                 if(!o) return false;
@@ -1491,7 +1491,7 @@ bool NodeBaseImpl::getLowerRightCorner(int &xPos, int &yPos) const
         else if(o->previousSibling())
             o = o->previousSibling();
         else {
-            RenderObject *prev = 0;
+            RenderObject *prev = nullptr;
             while(!prev) {
                 o = o->parent();
                 if(!o) return false;
@@ -1588,7 +1588,7 @@ void NodeBaseImpl::dispatchChildInsertedEvents( NodeImpl *child, int &exceptionc
             c->insertedIntoDocument();
 
             if (hasInsertedListeners) {
-                MutationEventImpl* const evt = new MutationEventImpl(EventImpl::DOMNODEINSERTEDINTODOCUMENT_EVENT,false,false,0,DOMString(),DOMString(),DOMString(),0);
+                MutationEventImpl* const evt = new MutationEventImpl(EventImpl::DOMNODEINSERTEDINTODOCUMENT_EVENT,false,false,nullptr,DOMString(),DOMString(),DOMString(),0);
                 evt->ref();
                 c->dispatchEvent(evt,exceptioncode,true);
                 evt->deref();
@@ -1621,7 +1621,7 @@ void NodeBaseImpl::dispatchChildRemovalEvents( NodeImpl *child, int &exceptionco
     if (p->nodeType() == Node::DOCUMENT_NODE) {
         for (NodeImpl *c = child; c; c = c->traverseNextNode(child)) {
             if (hasRemovalListeners) {
-                MutationEventImpl* const evt = new MutationEventImpl(EventImpl::DOMNODEREMOVEDFROMDOCUMENT_EVENT,false,false,0,DOMString(),DOMString(),DOMString(),0);
+                MutationEventImpl* const evt = new MutationEventImpl(EventImpl::DOMNODEREMOVEDFROMDOCUMENT_EVENT,false,false,nullptr,DOMString(),DOMString(),DOMString(),0);
                 evt->ref();
                 c->dispatchEvent(evt,exceptioncode,true);
                 evt->deref();
@@ -1696,7 +1696,7 @@ unsigned long NodeListImpl::length() const
 unsigned long NodeListImpl::calcLength(NodeImpl *start) const
 {
     unsigned long len = 0;
-    for(NodeImpl *n = start->firstChild(); n != 0; n = n->nextSibling()) {
+    for(NodeImpl *n = start->firstChild(); n; n = n->nextSibling()) {
         bool recurse = true;
         if (nodeMatches(n, recurse))
                 len++;
@@ -1737,23 +1737,23 @@ static NodeImpl* helperNext(NodeImpl* node, NodeImpl* absStart)
     if (node != absStart)
         return node->nextSibling();
     else
-        return 0;
+        return nullptr;
 }
 
 NodeImpl *NodeListImpl::recursiveItem ( NodeImpl* absStart, NodeImpl *start, unsigned long &offset ) const
 {
-    for(NodeImpl *n = start; n != 0; n = helperNext(n, absStart)) {
+    for(NodeImpl *n = start; n; n = helperNext(n, absStart)) {
         bool recurse = true;
         if (nodeMatches(n, recurse))
             if (!offset--)
                 return n;
 
-        NodeImpl *depthSearch = recurse ? recursiveItem(n, n->firstChild(), offset) : 0;
+        NodeImpl *depthSearch = recurse ? recursiveItem(n, n->firstChild(), offset) : nullptr;
         if (depthSearch)
             return depthSearch;
     }
 
-    return 0; // no matching node in this subtree
+    return nullptr; // no matching node in this subtree
 }
 
 
@@ -1790,7 +1790,7 @@ NodeImpl *NodeListImpl::recursiveItemBack ( NodeImpl* absStart, NodeImpl *start,
     }
     while (n && n != absStart);
 
-    return 0;
+    return nullptr;
 }
 
 
@@ -1800,7 +1800,7 @@ NodeListImpl::Cache::~Cache()
 void NodeListImpl::Cache::clear(DocumentImpl* doc)
 {
    hasLength = false;
-   current.node = 0;
+   current.node = nullptr;
    version   = doc->domTreeVersion();
 }
 
@@ -1901,7 +1901,7 @@ NodeImpl *GenericRONamedNodeMapImpl::getNamedItem ( NodeImpl::Id id, bool /*nsAw
     for (; it.current(); ++it)
         if (it.current()->id() == id)
             return it.current();
-    return 0;
+    return nullptr;
 }
 
 Node GenericRONamedNodeMapImpl::setNamedItem ( NodeImpl* /*arg*/, bool /*nsAware*/, DOMStringImpl* /*qName*/, int &exceptioncode )
@@ -1909,7 +1909,7 @@ Node GenericRONamedNodeMapImpl::setNamedItem ( NodeImpl* /*arg*/, bool /*nsAware
     // can't modify this list through standard DOM functions
     // NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly
     exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
-    return 0;
+    return nullptr;
 }
 
 Node GenericRONamedNodeMapImpl::removeNamedItem ( NodeImpl::Id /*id*/, bool /*nsAware*/, DOMStringImpl* /*qName*/, int &exceptioncode )
@@ -1917,13 +1917,13 @@ Node GenericRONamedNodeMapImpl::removeNamedItem ( NodeImpl::Id /*id*/, bool /*ns
     // can't modify this list through standard DOM functions
     // NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly
     exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
-    return 0;
+    return nullptr;
 }
 
 NodeImpl *GenericRONamedNodeMapImpl::item ( unsigned long index ) const
 {
     if (index >= m_contents->count())
-        return 0;
+        return nullptr;
 
     return m_contents->at(index);
 }
@@ -1936,7 +1936,7 @@ unsigned long GenericRONamedNodeMapImpl::length(  ) const
 void GenericRONamedNodeMapImpl::addNode(NodeImpl *n)
 {
     // The spec says that in the case of duplicates we only keep the first one
-    if (getNamedItem(n->id(), false, 0))
+    if (getNamedItem(n->id(), false, nullptr))
         return;
 
     n->ref();
@@ -1950,7 +1950,7 @@ NodeImpl::Id GenericRONamedNodeMapImpl::mapId(DOMStringImpl* namespaceURI,
 	return 0;
 
     return m_doc->getId(NodeImpl::ElementId,
-                        namespaceURI, 0, localName, readonly,
+                        namespaceURI, nullptr, localName, readonly,
                         false /*don't lookupHTML*/);
 }
 
@@ -2027,14 +2027,14 @@ void RegisteredListenerList::setHTMLEventListener(int id, EventListener *listene
 EventListener *RegisteredListenerList::getHTMLEventListener(int id)
 {
     if (!listeners)
-        return 0;
+        return nullptr;
 
     TQValueList<RegisteredEventListener>::iterator it;
     for (it = listeners->begin(); it != listeners->end(); ++it)
         if ((*it).id == id && isHTMLEventListener((*it).listener)) {
             return (*it).listener;
         }
-    return 0;
+    return nullptr;
 }
 
 bool RegisteredListenerList::hasEventListener(int id)
@@ -2053,7 +2053,7 @@ bool RegisteredListenerList::hasEventListener(int id)
 void RegisteredListenerList::clear()
 {
     delete listeners;
-    listeners = 0;
+    listeners = nullptr;
 }
 
 bool RegisteredListenerList::stillContainsListener(const RegisteredEventListener& listener)
@@ -2064,5 +2064,5 @@ bool RegisteredListenerList::stillContainsListener(const RegisteredEventListener
 }
 
 RegisteredListenerList::~RegisteredListenerList() {
-    delete listeners; listeners = 0;
+    delete listeners; listeners = nullptr;
 }
diff --git a/tdehtml/xml/dom_nodeimpl.h b/tdehtml/xml/dom_nodeimpl.h
index 457a05787..aa7309a80 100644
--- a/tdehtml/xml/dom_nodeimpl.h
+++ b/tdehtml/xml/dom_nodeimpl.h
@@ -59,7 +59,7 @@ class RegisteredEventListener;
 class EventImpl;
 
 struct RegisteredListenerList {
-    RegisteredListenerList() : listeners(0)
+    RegisteredListenerList() : listeners(nullptr)
     {}
 
     ~RegisteredListenerList();
@@ -197,7 +197,7 @@ public:
     {
         MouseEvent( int _button, MouseEventType _type,
                     const DOMString &_url = DOMString(), const DOMString& _target = DOMString(),
-                    NodeImpl *_innerNode = 0, NodeImpl *_innerNonSharedNode = 0)
+                    NodeImpl *_innerNode = nullptr, NodeImpl *_innerNonSharedNode = nullptr)
             {
                 button = _button; type = _type;
                 url = _url; target = _target;
@@ -309,7 +309,7 @@ public:
      *
      * see traversePreviousNode()
      */
-    NodeImpl *traverseNextNode(NodeImpl *stayWithin = 0) const;
+    NodeImpl *traverseNextNode(NodeImpl *stayWithin = nullptr) const;
 
     /**
      * Does a reverse pre-order traversal to find the node that comes before the current one in document order
@@ -490,7 +490,7 @@ class NodeBaseImpl : public NodeImpl
 {
 public:
     NodeBaseImpl(DocumentImpl *doc)
-        : NodeImpl(doc), _first(0), _last(0) {}
+        : NodeImpl(doc), _first(nullptr), _last(nullptr) {}
     virtual ~NodeBaseImpl();
 
     // DOM methods overridden from  parent classes
@@ -604,7 +604,7 @@ public:
 
     typedef Cache* CacheFactory();
 
-    NodeListImpl(NodeImpl* node, int type, CacheFactory* factory = 0);
+    NodeListImpl(NodeImpl* node, int type, CacheFactory* factory = nullptr);
     virtual ~NodeListImpl();
 
     // DOM methods & attributes for NodeList
@@ -688,7 +688,7 @@ public:
     virtual ~NamedNodeMapImpl();
 
     // DOM methods & attributes for NamedNodeMap
-    virtual NodeImpl *getNamedItem ( NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = 0 ) const = 0;
+    virtual NodeImpl *getNamedItem ( NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = nullptr ) const = 0;
     virtual Node removeNamedItem ( NodeImpl::Id id, bool nsAware, DOMStringImpl* qName, int &exceptioncode ) = 0;
     virtual Node setNamedItem ( NodeImpl* arg, bool nsAware, DOMStringImpl* qName, int &exceptioncode ) = 0;
 
@@ -712,7 +712,7 @@ public:
 
     // DOM methods & attributes for NamedNodeMap
 
-    virtual NodeImpl *getNamedItem ( NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = 0 ) const;
+    virtual NodeImpl *getNamedItem ( NodeImpl::Id id, bool nsAware = false, DOMStringImpl* qName = nullptr ) const;
     virtual Node removeNamedItem ( NodeImpl::Id id, bool nsAware, DOMStringImpl* qName, int &exceptioncode );
     virtual Node setNamedItem ( NodeImpl* arg, bool nsAware, DOMStringImpl* qName, int &exceptioncode );
 
diff --git a/tdehtml/xml/dom_stringimpl.cpp b/tdehtml/xml/dom_stringimpl.cpp
index 12f1481c0..0a9932089 100644
--- a/tdehtml/xml/dom_stringimpl.cpp
+++ b/tdehtml/xml/dom_stringimpl.cpp
@@ -311,7 +311,7 @@ tdehtml::Length* DOMStringImpl::toLengthArray(int& len) const
 
     // If we have no commas, we have no array.
     if( len == 1 )
-        return 0L;
+        return nullptr;
 
     tdehtml::Length* r = new tdehtml::Length[len];
 
diff --git a/tdehtml/xml/dom_stringimpl.h b/tdehtml/xml/dom_stringimpl.h
index 09c746336..47e379a3c 100644
--- a/tdehtml/xml/dom_stringimpl.h
+++ b/tdehtml/xml/dom_stringimpl.h
@@ -40,7 +40,7 @@ private:
     DOMStringImpl(const DOMStringImpl&);
     DOMStringImpl& operator=(const DOMStringImpl&);
 protected:
-    DOMStringImpl() { s = 0, l = 0; }
+    DOMStringImpl() { s = nullptr, l = 0; }
 public:
     DOMStringImpl(const TQChar *str, unsigned int len) {
 	bool havestr = str && len;
@@ -82,7 +82,7 @@ public:
     bool containsOnlyWhitespace() const;
 
     // ignores trailing garbage, unlike TQString
-    int toInt(bool* ok = 0) const;
+    int toInt(bool* ok = nullptr) const;
 
     tdehtml::Length* toLengthArray(int& len) const;
     tdehtml::Length* toCoordsArray(int& len) const;
diff --git a/tdehtml/xml/dom_textimpl.cpp b/tdehtml/xml/dom_textimpl.cpp
index aa478b922..6ebefa14a 100644
--- a/tdehtml/xml/dom_textimpl.cpp
+++ b/tdehtml/xml/dom_textimpl.cpp
@@ -45,7 +45,7 @@ static DOMString escapeHTML( const DOMString& in )
 CharacterDataImpl::CharacterDataImpl(DocumentImpl *doc, DOMStringImpl* _text)
     : NodeImpl(doc)
 {
-    str = _text ? _text : new DOMStringImpl(0, 0);
+    str = _text ? _text : new DOMStringImpl(nullptr, 0);
     str->ref();
 }
 
@@ -210,7 +210,7 @@ void CharacterDataImpl::dispatchModifiedEvent(DOMStringImpl *prevValue)
     DOMStringImpl *newValue = str->copy();
     newValue->ref();
     int exceptioncode = 0;
-    MutationEventImpl* const evt = new MutationEventImpl(EventImpl::DOMCHARACTERDATAMODIFIED_EVENT,true,false,0,prevValue,newValue,DOMString(),0);
+    MutationEventImpl* const evt = new MutationEventImpl(EventImpl::DOMCHARACTERDATAMODIFIED_EVENT,true,false,nullptr,prevValue,newValue,DOMString(),0);
     evt->ref();
     dispatchEvent(evt,exceptioncode);
     evt->deref();
@@ -323,13 +323,13 @@ TextImpl *TextImpl::splitText( const unsigned long offset, int &exceptioncode )
     // kjs bindings)
     if (offset > str->l || (long)offset < 0) {
         exceptioncode = DOMException::INDEX_SIZE_ERR;
-        return 0;
+        return nullptr;
     }
 
     // NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
     if (isReadOnly()) {
         exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
-        return 0;
+        return nullptr;
     }
 
     DOMStringImpl *oldStr = str;
@@ -344,7 +344,7 @@ TextImpl *TextImpl::splitText( const unsigned long offset, int &exceptioncode )
     if (parentNode())
         parentNode()->insertBefore(newText,nextSibling(), exceptioncode );
     if ( exceptioncode )
-        return 0;
+        return nullptr;
 
     if (m_render)
         (static_cast<RenderText*>(m_render))->setText(str);
diff --git a/tdehtml/xml/dom_textimpl.h b/tdehtml/xml/dom_textimpl.h
index 07d2c0011..65cdc2b40 100644
--- a/tdehtml/xml/dom_textimpl.h
+++ b/tdehtml/xml/dom_textimpl.h
@@ -39,7 +39,7 @@ class CharacterDataImpl : public NodeImpl
 public:
     CharacterDataImpl(DocumentImpl *doc, DOMStringImpl* _text);
     CharacterDataImpl(DocumentImpl *doc)
-        : NodeImpl(doc), str(0) {}
+        : NodeImpl(doc), str(nullptr) {}
 
     virtual ~CharacterDataImpl();
 
diff --git a/tdehtml/xml/dom_xmlimpl.cpp b/tdehtml/xml/dom_xmlimpl.cpp
index 121ad436a..af7ad5084 100644
--- a/tdehtml/xml/dom_xmlimpl.cpp
+++ b/tdehtml/xml/dom_xmlimpl.cpp
@@ -31,17 +31,17 @@ using namespace DOM;
 
 EntityImpl::EntityImpl(DocumentImpl *doc) : NodeBaseImpl(doc)
 {
-    m_publicId = 0;
-    m_systemId = 0;
-    m_notationName = 0;
-    m_name = 0;
+    m_publicId = nullptr;
+    m_systemId = nullptr;
+    m_notationName = nullptr;
+    m_name = nullptr;
 }
 
 EntityImpl::EntityImpl(DocumentImpl *doc, DOMString _name) : NodeBaseImpl(doc)
 {
-    m_publicId = 0;
-    m_systemId = 0;
-    m_notationName = 0;
+    m_publicId = nullptr;
+    m_systemId = nullptr;
+    m_notationName = nullptr;
     m_name = _name.implementation();
     if (m_name)
         m_name->ref();
@@ -58,7 +58,7 @@ EntityImpl::EntityImpl(DocumentImpl *doc, DOMString _publicId, DOMString _system
     m_notationName = _notationName.implementation();
     if (m_notationName)
         m_notationName->ref();
-    m_name = 0;
+    m_name = nullptr;
 }
 
 
@@ -103,7 +103,7 @@ NodeImpl *EntityImpl::cloneNode ( bool /*deep*/)
 {
     // Spec says cloning Document nodes is "implementation dependent"
     // so we do not support it...
-    return 0;
+    return nullptr;
 }
 
 // DOM Section 1.1.1
@@ -158,7 +158,7 @@ DOMString EntityImpl::toString() const
 
 EntityReferenceImpl::EntityReferenceImpl(DocumentImpl *doc) : NodeBaseImpl(doc)
 {
-    m_entityName = 0;
+    m_entityName = nullptr;
 }
 
 EntityReferenceImpl::EntityReferenceImpl(DocumentImpl *doc, DOMStringImpl *_entityName) : NodeBaseImpl(doc)
@@ -224,9 +224,9 @@ DOMString EntityReferenceImpl::toString() const
 
 NotationImpl::NotationImpl(DocumentImpl *doc) : NodeBaseImpl(doc)
 {
-    m_publicId = 0;
-    m_systemId = 0;
-    m_name = 0;
+    m_publicId = nullptr;
+    m_systemId = nullptr;
+    m_name = nullptr;
 }
 
 NotationImpl::NotationImpl(DocumentImpl *doc, DOMString _name, DOMString _publicId, DOMString _systemId) : NodeBaseImpl(doc)
@@ -276,7 +276,7 @@ NodeImpl *NotationImpl::cloneNode ( bool /*deep*/)
 {
     // Spec says cloning Document nodes is "implementation dependent"
     // so we do not support it...
-    return 0;
+    return nullptr;
 }
 
 // DOM Section 1.1.1
@@ -292,11 +292,11 @@ bool NotationImpl::childTypeAllowed( unsigned short /*type*/ )
 
 ProcessingInstructionImpl::ProcessingInstructionImpl(DocumentImpl *doc) : NodeBaseImpl(doc)
 {
-    m_target = 0;
-    m_data = 0;
-    m_localHref = 0;
-    m_sheet = 0;
-    m_cachedSheet = 0;
+    m_target = nullptr;
+    m_data = nullptr;
+    m_localHref = nullptr;
+    m_sheet = nullptr;
+    m_cachedSheet = nullptr;
 }
 
 ProcessingInstructionImpl::ProcessingInstructionImpl(DocumentImpl *doc, DOMString _target, DOMString _data) : NodeBaseImpl(doc)
@@ -307,9 +307,9 @@ ProcessingInstructionImpl::ProcessingInstructionImpl(DocumentImpl *doc, DOMStrin
     m_data = _data.implementation();
     if (m_data)
         m_data->ref();
-    m_sheet = 0;
-    m_cachedSheet = 0;
-    m_localHref = 0;
+    m_sheet = nullptr;
+    m_cachedSheet = nullptr;
+    m_localHref = nullptr;
 }
 
 ProcessingInstructionImpl::~ProcessingInstructionImpl()
@@ -440,7 +440,7 @@ void ProcessingInstructionImpl::setStyleSheet(const DOM::DOMString &url, const D
     m_sheet->parseString(sheet);
     if (m_cachedSheet)
 	m_cachedSheet->deref(this);
-    m_cachedSheet = 0;
+    m_cachedSheet = nullptr;
 
     getDocument()->styleSheetLoaded();
 }
diff --git a/tdehtml/xml/xml_tokenizer.cpp b/tdehtml/xml/xml_tokenizer.cpp
index 2ee90097b..d45ab4c36 100644
--- a/tdehtml/xml/xml_tokenizer.cpp
+++ b/tdehtml/xml/xml_tokenizer.cpp
@@ -42,7 +42,7 @@ using namespace DOM;
 using namespace tdehtml;
 
 XMLIncrementalSource::XMLIncrementalSource()
-    : TQXmlInputSource(), m_pos( 0 ), m_unicode( 0 ),
+    : TQXmlInputSource(), m_pos( 0 ), m_unicode( nullptr ),
       m_finished( false )
 {
 }
@@ -395,8 +395,8 @@ XMLTokenizer::XMLTokenizer(DOM::DocumentImpl *_doc, TDEHTMLView *_view)
 {
     m_doc = _doc;
     m_view = _view;
-    m_scriptsIt = 0;
-    m_cachedScript = 0;
+    m_scriptsIt = nullptr;
+    m_cachedScript = nullptr;
     m_noErrors = true;
     m_reader.setContentHandler( &m_handler );
     m_reader.setLexicalHandler( &m_handler );
@@ -476,10 +476,10 @@ void XMLTokenizer::finish()
         NodeImpl     *h1 = doc->createElementNS(XHTML_NAMESPACE,"h1");
         NodeImpl       *headingText = doc->createTextNode(i18n("XML parsing error"));
         NodeImpl     *errorText = doc->createTextNode(m_handler.errorProtocol());
-        NodeImpl     *hr = 0;
-        NodeImpl     *pre = 0;
-        NodeImpl     *lineText = 0;
-        NodeImpl     *errorLocText = 0;
+        NodeImpl     *hr = nullptr;
+        NodeImpl     *pre = nullptr;
+        NodeImpl     *lineText = nullptr;
+        NodeImpl     *errorLocText = nullptr;
         if ( !line.isNull() ) {
             hr = doc->createElementNS(XHTML_NAMESPACE,"hr");
             pre = doc->createElementNS(XHTML_NAMESPACE,"pre");
@@ -593,7 +593,7 @@ void XMLTokenizer::notifyFinished(CachedObject *finishedObj)
     if (finishedObj == m_cachedScript) {
         DOMString scriptSource = m_cachedScript->script();
         m_cachedScript->deref(this);
-        m_cachedScript = 0;
+        m_cachedScript = nullptr;
         if (m_view)
             m_view->part()->executeScript(DOM::Node(), scriptSource.string());
         executeScripts();
@@ -602,7 +602,7 @@ void XMLTokenizer::notifyFinished(CachedObject *finishedObj)
 
 bool XMLTokenizer::isWaitingForScripts() const
 {
-    return m_cachedScript != 0;
+    return m_cachedScript != nullptr;
 }
 
 #include "xml_tokenizer.moc"
diff --git a/tdehtml/xml/xml_tokenizer.h b/tdehtml/xml/xml_tokenizer.h
index d6b4dbe02..843ad7975 100644
--- a/tdehtml/xml/xml_tokenizer.h
+++ b/tdehtml/xml/xml_tokenizer.h
@@ -162,7 +162,7 @@ private:
 class XMLTokenizer : public Tokenizer, public tdehtml::CachedObjectClient
 {
 public:
-    XMLTokenizer(DOM::DocumentImpl *, TDEHTMLView * = 0);
+    XMLTokenizer(DOM::DocumentImpl *, TDEHTMLView * = nullptr);
     virtual ~XMLTokenizer();
     virtual void begin();
     virtual void write( const TokenizerString &str, bool );
diff --git a/tdemarkdown/markdown_part.cpp b/tdemarkdown/markdown_part.cpp
index a77df6d88..6cf9c40ee 100644
--- a/tdemarkdown/markdown_part.cpp
+++ b/tdemarkdown/markdown_part.cpp
@@ -85,7 +85,7 @@ bool MarkdownPart::openURL(const KURL& u)
       }
     }
 
-    emit started(0L);
+    emit started(nullptr);
     return true;
 }
 
-- 
cgit v1.2.3

