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

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 ksnapshot/ksnapshot.cpp     |  4 ++--
 ksnapshot/ksnapshot.h       |  6 +++---
 ksnapshot/main.cpp          | 14 +++++++-------
 ksnapshot/regiongrabber.cpp |  4 ++--
 ksnapshot/regiongrabber.h   |  2 +-
 ksnapshot/windowgrabber.cpp | 10 +++++-----
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/ksnapshot/ksnapshot.cpp b/ksnapshot/ksnapshot.cpp
index 36918c4a..72b4625e 100644
--- a/ksnapshot/ksnapshot.cpp
+++ b/ksnapshot/ksnapshot.cpp
@@ -93,7 +93,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
     KDialogBase(parent, name, true, TQString(), Help|User1, User1,
     true, KStdGuiItem::quit() )
 {
-    grabber = new TQWidget( 0, 0, WStyle_Customize | WX11BypassWM );
+    grabber = new TQWidget( nullptr, nullptr, WStyle_Customize | WX11BypassWM );
     grabber->move( -1000, -1000 );
     grabber->installEventFilter( this );
 
@@ -716,7 +716,7 @@ const char * SnapshotDrag::format(int i) const
     if( i < (int) formats.count() ) {
         return formats[i];
     } else {
-        return 0;
+        return nullptr;
     }
 }
 
diff --git a/ksnapshot/ksnapshot.h b/ksnapshot/ksnapshot.h
index 45734f88..1e0bee01 100644
--- a/ksnapshot/ksnapshot.h
+++ b/ksnapshot/ksnapshot.h
@@ -28,7 +28,7 @@ class KSnapshotPreview : public TQLabel
     TQ_OBJECT
 
     public:
-        KSnapshotPreview(TQWidget *parent, const char *name = 0)
+        KSnapshotPreview(TQWidget *parent, const char *name = nullptr)
             : TQLabel(parent, name)
         {
             setAlignment(AlignHCenter | AlignVCenter);
@@ -96,7 +96,7 @@ class KSnapshot : public KDialogBase, virtual public KSnapshotIface
   TQ_OBJECT
 
 public:
-  KSnapshot(TQWidget *parent= 0, const char *name= 0, bool grabCurrent=false);
+  KSnapshot(TQWidget *parent= nullptr, const char *name= nullptr, bool grabCurrent=false);
   ~KSnapshot();
 
   enum CaptureMode { FullScreen=0, WindowUnderCursor=1, Region=2, ChildWindow=3 };
@@ -173,7 +173,7 @@ class SnapshotDrag : public TQImageDrag {
     KSnapshot *ksnap;
     TQValueList<TQCString> formats;
 public:
-    SnapshotDrag( TQImage image, KSnapshot * dragSource, const char * name = 0 );
+    SnapshotDrag( TQImage image, KSnapshot * dragSource, const char * name = nullptr );
     const char * format(int i) const;
     TQByteArray encodedData(const char* format) const;
 };
diff --git a/ksnapshot/main.cpp b/ksnapshot/main.cpp
index 098ae004..00608452 100644
--- a/ksnapshot/main.cpp
+++ b/ksnapshot/main.cpp
@@ -35,9 +35,9 @@ static const char description[] =
 
 static TDECmdLineOptions options[] =
 {
-    { "c", 0, 0 },
-    { "current", I18N_NOOP("Captures the window under the mouse on startup (instead of the desktop)"), 0 },
-    { 0, 0, 0 }
+    { "c", nullptr, nullptr },
+    { "current", I18N_NOOP("Captures the window under the mouse on startup (instead of the desktop)"), nullptr },
+    { nullptr, nullptr, nullptr }
 };
 
 int main(int argc, char **argv)
@@ -45,9 +45,9 @@ int main(int argc, char **argv)
   TDEAboutData aboutData( "ksnapshot", I18N_NOOP("KSnapshot"),
     KSNAPVERSION, description, TDEAboutData::License_GPL,
     "(c) 1997-2004, Richard J. Moore,\n(c) 2000, Matthias Ettrich,\n(c) 2002-2003 Aaron J. Seigo");
-  aboutData.addAuthor("Richard J. Moore",0, "rich@kde.org");
-  aboutData.addAuthor("Matthias Ettrich",0, "ettrich@kde.org");
-  aboutData.addAuthor("Aaron J. Seigo", 0, "aseigo@kde.org");
+  aboutData.addAuthor("Richard J. Moore",nullptr, "rich@kde.org");
+  aboutData.addAuthor("Matthias Ettrich",nullptr, "ettrich@kde.org");
+  aboutData.addAuthor("Aaron J. Seigo", nullptr, "aseigo@kde.org");
   aboutData.addCredit( "Nadeem Hasan", I18N_NOOP("Region Grabbing\nReworked GUI"),
       "nhasan@kde.org" );
 
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
   KSnapshot *toplevel;
 
   if ( args->isSet( "current" ) )
-     toplevel = new KSnapshot( 0, 0, true );
+     toplevel = new KSnapshot( nullptr, nullptr, true );
   else
      toplevel = new KSnapshot();
 
diff --git a/ksnapshot/regiongrabber.cpp b/ksnapshot/regiongrabber.cpp
index a562fdcc..c0ce9637 100644
--- a/ksnapshot/regiongrabber.cpp
+++ b/ksnapshot/regiongrabber.cpp
@@ -68,8 +68,8 @@ void SizeTip::positionTip( const TQRect &rect )
 }
 
 RegionGrabber::RegionGrabber()
-  : TQWidget( 0, 0, WStyle_Customize | WX11BypassWM ),
-    mouseDown( false ), sizeTip( 0L )
+  : TQWidget( nullptr, nullptr, WStyle_Customize | WX11BypassWM ),
+    mouseDown( false ), sizeTip( nullptr )
 {
   sizeTip = new SizeTip( ( TQWidget * )0L );
 
diff --git a/ksnapshot/regiongrabber.h b/ksnapshot/regiongrabber.h
index 0495bf5a..45ef4b6f 100644
--- a/ksnapshot/regiongrabber.h
+++ b/ksnapshot/regiongrabber.h
@@ -28,7 +28,7 @@ class TQTimer;
 class SizeTip : public TQLabel
 {
   public:
-    SizeTip( TQWidget *parent, const char *name=0 );
+    SizeTip( TQWidget *parent, const char *name=nullptr );
     ~SizeTip() {}
 
   void setTip( const TQRect &rect );
diff --git a/ksnapshot/windowgrabber.cpp b/ksnapshot/windowgrabber.cpp
index d3931c9f..e59390b8 100644
--- a/ksnapshot/windowgrabber.cpp
+++ b/ksnapshot/windowgrabber.cpp
@@ -69,7 +69,7 @@ void getWindowsRecursive( std::vector<TQRect>& windows, Window w,
             for( unsigned int i = 0; i < nchildren; ++i ) {
                 getWindowsRecursive( windows, children[ i ], x, y, depth + 1 );
 	    }
-            if( children )
+            if( children != nullptr )
 		XFree( children );
 	}
     }
@@ -89,7 +89,7 @@ Window findRealWindow( Window w, int depth = 0 )
     unsigned char* prop;
     if( XGetWindowProperty( tqt_xdisplay(), w, wm_state, 0, 0, False, AnyPropertyType,
 	&type, &format, &nitems, &after, &prop ) == Success ) {
-	if( prop )
+	if( prop != nullptr )
 	    XFree( prop );
 	if( type != None )
 	    return w;
@@ -103,7 +103,7 @@ Window findRealWindow( Window w, int depth = 0 )
 	     i < nchildren && ret == None;
 	     ++i )
 	    ret = findRealWindow( children[ i ], depth + 1 );
-	if( children )
+	if( children != nullptr )
 	    XFree( children );
     }
     return ret;
@@ -186,7 +186,7 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
 }
 
 WindowGrabber::WindowGrabber()
-: TQDialog( 0, 0, true, TQt::WStyle_Customize  | TQt::WStyle_NoBorder |
+: TQDialog( nullptr, nullptr, true, TQt::WStyle_Customize  | TQt::WStyle_NoBorder |
                        TQt::WStyle_StaysOnTop | TQt::WX11BypassWM ),
   current( -1 ), yPos( -1 )
 {
@@ -223,7 +223,7 @@ TQPixmap WindowGrabber::grabCurrent( bool includeDecorations )
     unsigned int nchildren;
     if( XQueryTree( tqt_xdisplay(), child, &root, &parent,
                     &children, &nchildren ) != 0 ) {
-	if( children )
+	if( children != nullptr )
 	    XFree( children );
 	int newx, newy;
 	Window dummy;
-- 
cgit v1.2.3

