From ce84a616ab75b891a59deb4edd5cd3546c7f2b67 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 20 Sep 2026 16:20:00 -0300
Subject: Replace NULL pointer constants with nullptr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 src/kooldock.cpp       | 64 +++++++++++++++++++++++++-------------------------
 src/setupdialogprg.cpp |  6 ++---
 src/xosd.cpp           |  2 +-
 3 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/kooldock.cpp b/src/kooldock.cpp
index ad9ea9e..a22474d 100644
--- a/src/kooldock.cpp
+++ b/src/kooldock.cpp
@@ -159,7 +159,7 @@ void KoolDock::mTimerEnd() // mouse emulation timer
     }
     else {
       debug(TQString("mTimer1Leave: %1 %2 %3 %4 %5 %6").arg(pointer.x()).arg(pointer.y()).arg(dh - h).arg(ry).arg(rx).arg(x + w));
-      onleaveEvent(NULL);
+      onleaveEvent(nullptr);
     }
   }
   else {
@@ -170,14 +170,14 @@ void KoolDock::mTimerEnd() // mouse emulation timer
       else {
         debug(TQString("mTimer2EnterEv: %1 %2").arg(pointer.x() - rx).arg(pointer.y() - ry));
         if ((mpx >= firstX) && (mpx <= firstX+tmpw)) {
-          enterEvent(NULL);
+          enterEvent(nullptr);
         }
       }
     }
     else {
       if (fExpanded) {
         debug(TQString("mTimer2Leave"));
-        onleaveEvent(NULL);
+        onleaveEvent(nullptr);
       }
     }
   }
@@ -234,7 +234,7 @@ void KoolDock::trackTimer2End()
     debug(TQString("tracktimer: grabWindow(%1, %2, %3, %4)").arg(x1).arg(dh - h1).arg(w1).arg(h1));
     resize2(w, h);
     Ybase = iwBig2;
-    enterEvent(NULL);
+    enterEvent(nullptr);
   }
   track2active = false;
 }
@@ -763,7 +763,7 @@ void KoolDock::paintEvent(TQPaintEvent *)
 void KoolDock::unhighlight()
 {
   iOnClick = -1;
-  paintEvent(NULL);;
+  paintEvent(nullptr);;
 }
 
 void KoolDock::mousePressEvent(TQMouseEvent *e)
@@ -798,7 +798,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton)
           // If user clicked on a quick launcher, launch the app
           // Acknowledge on click
           iOnClick = i;
-          paintEvent(NULL);
+          paintEvent(nullptr);
 
           // Run the app
           debug(TQString("clicked: %1").arg(items.at(i)->getName()));
@@ -897,7 +897,7 @@ void KoolDock::mPress(int mx, int my, ButtonState srcButton)
         }
       }
       if ((fHidden == 1) && (fHideOnClick == 1)) {
-        onleaveEvent(NULL); // it's configurable
+        onleaveEvent(nullptr); // it's configurable
       }
     }
   }
@@ -1125,10 +1125,10 @@ void KoolDock::mMoveEvent(int ex, int ey)
     if ((w1 < dw) && (!mkbigTimer->isActive() || (zoomTicksB > 1 && mkbigTimer->isActive()))) {
       if (!initialization && (menuCount == 0)) {
         if (mx < 0) {
-          onleaveEvent(NULL);
+          onleaveEvent(nullptr);
         }
         if ((lastX > 0) && (mx > tmpw + firstX - x1 - (w1 - w0) / 2)) {
-          onleaveEvent(NULL);
+          onleaveEvent(nullptr);
         }
       }
     }
@@ -1145,7 +1145,7 @@ void KoolDock::mMoveEvent(int ex, int ey)
     for (i = 0; (int) i < ii_first; i++) {
       cur_cx[i] += (int) ((soffset - eoffset + (w1 - w0) / 2) * (fzoomSpeed - zoomVal) / fzoomSpeed);
     }
-    paintEvent(NULL);
+    paintEvent(nullptr);
   }
 
   mx = ex-x1;
@@ -1270,7 +1270,7 @@ void KoolDock::mkbigTimerDo()
     Ybase = iwBig2 * (fzoomSpeed - zoomVal) / fzoomSpeed;
   }
   mMoveEvent(TQWidget::mapFromGlobal(TQCursor::pos()).x(), TQWidget::mapFromGlobal(TQCursor::pos()).y());
-  paintEvent(NULL);
+  paintEvent(nullptr);
 }
 
 void KoolDock::mksmallTimerDo()
@@ -1291,7 +1291,7 @@ void KoolDock::mksmallTimerDo()
     funcH = iwBig - iwSmall;
     iy = (iDist - iwSmall) / 2;
     mMoveEvent(lastXPos, lastYPos);
-    paintEvent(NULL);
+    paintEvent(nullptr);
   }
   zoomVal = zoomVal - zoomStepS;
 }
@@ -1339,7 +1339,7 @@ void KoolDock::mksmallTimerstop()
   }
   oldfirstX = x;
   oldtmpw = w;
-  paintEvent(NULL);
+  paintEvent(nullptr);
   if ((zoomTicksS >= neededTicksS) && fSpeed) {
     // Performace check
     int timing = perf->elapsed();
@@ -1399,7 +1399,7 @@ void KoolDock::enterEvent (TQEvent *)
   perf->start();
   mkbigTimer->start(zoomStep, false);
   mkbigTimerDo();
-  paintEvent(NULL);
+  paintEvent(nullptr);
   move2(x,dh-h);
 }
 
@@ -1465,7 +1465,7 @@ void KoolDock::run(const TQString& command)
       case KURIFilterData::NET_PROTOCOL:
       case KURIFilterData::HELP: {
         if (useList) {
-          TDEApplication::startServiceByDesktopPath(command, lstDrop, NULL , NULL , &ii , yy ,true);
+          TDEApplication::startServiceByDesktopPath(command, lstDrop, nullptr , nullptr , &ii , yy ,true);
         }
         else {
           (void) new KRun(_filterData->uri());
@@ -1728,7 +1728,7 @@ void KoolDock::windowChanged(WId id, unsigned int properties)
             // An inactive window's title changed
             // notify user
             item->anim(true);
-            if (onChangeTimer == NULL) {
+            if (onChangeTimer == nullptr) {
               onChangeTimer = new TQTimer(this);
               connect(onChangeTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(onChangeTimerTicked()));
               onChangeTimer->start(ON_CHANGE_ANIM_INTERVAL, false);
@@ -1759,7 +1759,7 @@ void KoolDock::windowChanged(WId id, unsigned int properties)
       }
       if (toRepaint) {
         doUpdateGeometry();
-        paintEvent(NULL);
+        paintEvent(nullptr);
       }
     }
   }
@@ -1821,15 +1821,15 @@ void KoolDock::activeWindowChanged(WId id)
     }
   }
 
-  if (toDelete && (onChangeTimer != NULL)) {
+  if (toDelete && (onChangeTimer != nullptr)) {
     delete onChangeTimer;
-    onChangeTimer = NULL;
+    onChangeTimer = nullptr;
     debug("Deleted onChangeTimer");
   }
   if (fGrouping) {
     movetoback(id);
   }
-  paintEvent(NULL);
+  paintEvent(nullptr);
 }
 
 void KoolDock::doUpdateGeometry()
@@ -1904,7 +1904,7 @@ void KoolDock::doUpdateGeometry()
   }
   oldfirstX = x;
   oldtmpw = w;
-  paintEvent(NULL);
+  paintEvent(nullptr);
   xosdw->move2(0, rdh);
 }
 
@@ -2546,7 +2546,7 @@ void KoolDock::onChangeTimerTicked()
   else {
     animValue = animValue - 5;
   }
-  paintEvent(NULL);
+  paintEvent(nullptr);
 }
 
 void KoolDock::updateBackground(const TQPixmap& pix)
@@ -2576,7 +2576,7 @@ void KoolDock::updateBackground(const TQPixmap& pix)
     }
   }
   uw = w;
-  paintEvent(NULL);
+  paintEvent(nullptr);
 }
 
 void KoolDock::toggleAlwaysOnTop()
@@ -2672,7 +2672,7 @@ void KoolDock::minApp()
           item->setIcon(shot);
         }
       }
-      paintEvent(NULL);
+      paintEvent(nullptr);
     }
     KWin::iconifyWindow(cId, true);
   }
@@ -3023,7 +3023,7 @@ void KoolDock::reload()
   mkbigTimer->stop();
   mksmallTimer->stop();
   mTimer->stop();
-  if (onChangeTimer != NULL) {
+  if (onChangeTimer != nullptr) {
     onChangeTimer->stop();
   }
   if (trackTimer) {
@@ -3038,7 +3038,7 @@ void KoolDock::reload()
   if (mksmallTimer) {
     delete mksmallTimer;
   }
-  if (onChangeTimer != NULL) {
+  if (onChangeTimer != nullptr) {
     delete onChangeTimer;
   }
   if (_filterData) {
@@ -3466,7 +3466,7 @@ void KoolDock::init()
   ii_first = 0;
   ii_last = items.count() - 1;
   iOnClick = -1;
-  onChangeTimer = NULL;
+  onChangeTimer = nullptr;
 
   Ybase = 0;
   soffset = 0;
@@ -3612,10 +3612,10 @@ void KoolDock::init()
     ptPart = 1;
   }
   if (fHidden == 0) {
-    paintEvent(NULL);
+    paintEvent(nullptr);
   }
   if (ptPart == 0) {
-    enterEvent(NULL);
+    enterEvent(nullptr);
   }
   else {
     pTest();
@@ -3626,7 +3626,7 @@ void KoolDock::init()
 void KoolDock::pTest()
 {
   if (ptPart == 0) {
-    onleaveEvent(NULL);
+    onleaveEvent(nullptr);
     ptPart = 1;
     return;
   }
@@ -3645,7 +3645,7 @@ void KoolDock::pTest()
   }
   show();
   if (fHidden == 0) {
-    paintEvent(NULL);
+    paintEvent(nullptr);
   }
   setupdlg->setEnabled(true);
   if (fFirstRun) {
@@ -3664,7 +3664,7 @@ void KoolDock::refreshBackground()
   }
   show();
   KWin::setOnAllDesktops(winId(),true);
-  paintEvent(NULL);
+  paintEvent(nullptr);
 }
 
 void KoolDock::dragMoveEvent(TQDragMoveEvent* event)
diff --git a/src/setupdialogprg.cpp b/src/setupdialogprg.cpp
index 83d458a..d715658 100644
--- a/src/setupdialogprg.cpp
+++ b/src/setupdialogprg.cpp
@@ -384,7 +384,7 @@ void SetupDialogPrg::applist_dropped(TQDropEvent* e,const TQValueList<TQIconDrag
 
 void SetupDialogPrg::removeLauncher()
 {
-  if (fileName != NULL) {
+  if (fileName != nullptr) {
     TQString question = i18n("Do you want to remove ") + fileName + TQString("?");
     int remove = KMessageBox::questionYesNo(0, question, i18n("Remove Launcher"));
     if (remove != KMessageBox::Yes) {
@@ -535,7 +535,7 @@ void SetupDialogPrg::right()
 
 void SetupDialogPrg::applist_clicked(TQIconViewItem* e, const TQPoint&)
 {
-  if (e != NULL) {
+  if (e != nullptr) {
     oldPos = e->index();
   }
   else {
@@ -545,7 +545,7 @@ void SetupDialogPrg::applist_clicked(TQIconViewItem* e, const TQPoint&)
 
 void SetupDialogPrg::applist_contextMenuRequested(TQIconViewItem* e,const TQPoint&)
 {
-  if (e != NULL) {
+  if (e != nullptr) {
     TDEPopupMenu* popup = new TDEPopupMenu();
     TDEPopupMenu* setpos = new TDEPopupMenu();
  
diff --git a/src/xosd.cpp b/src/xosd.cpp
index 37f1f2b..60c2d89 100644
--- a/src/xosd.cpp
+++ b/src/xosd.cpp
@@ -190,7 +190,7 @@ void xosd::move2(int x, int y)
       }
       bitBlt(&bgBuffer, 0, 0, &tmpBuffer);
       lastX = x;
-      paintEvent(NULL);
+      paintEvent(nullptr);
     }
     move(x, y);
     lastX = x;
-- 
cgit v1.2.3

