From 2b01380ad90472eeb12ebec0819b660a889fa691 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 3 Oct 2026 17:46:36 -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>
---
 kipi-plugins/batchprocessimages/imagepreview.cpp | 2 +-
 kipi-plugins/calendar/calselect.cpp              | 2 +-
 kipi-plugins/findimages/displaycompare.cpp       | 4 ++--
 kipi-plugins/findimages/fuzzycompare.cpp         | 6 +++---
 kipi-plugins/htmlexport/xmlutils.h               | 2 +-
 kipi-plugins/picasawebexport/picasawebtalker.cpp | 2 +-
 kipi-plugins/picasawebexport/picasawebwindow.cpp | 6 +++---
 kipi-plugins/printwizard/tphoto.cpp              | 4 ++--
 kipi-plugins/rawconverter/rawdecodingiface.cpp   | 2 +-
 kipi-plugins/sendimages/sendimages.cpp           | 2 +-
 kipi-plugins/slideshow/slideshow.cpp             | 2 +-
 kipi-plugins/sync/libkipi2/collection.cpp        | 4 ++--
 kipi-plugins/sync/libkipi2/collection.h          | 2 +-
 kipi-plugins/sync/plugin_sync.cpp                | 2 +-
 kipi-plugins/sync/sink.cpp                       | 4 ++--
 kipi-plugins/sync/sinkfactory.cpp                | 2 +-
 kipi-plugins/sync/sinks.cpp                      | 8 ++++----
 kipi-plugins/sync/sinks/gallery/gallerysink.cpp  | 2 +-
 18 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/kipi-plugins/batchprocessimages/imagepreview.cpp b/kipi-plugins/batchprocessimages/imagepreview.cpp
index 44e1135c..3e06dbde 100644
--- a/kipi-plugins/batchprocessimages/imagepreview.cpp
+++ b/kipi-plugins/batchprocessimages/imagepreview.cpp
@@ -197,7 +197,7 @@ PixmapView::PixmapView(bool cropAction, TQWidget *parent, const char *name)
            : TQScrollView(parent, name)
 {
     m_cropAction = cropAction;
-    m_pix = NULL;
+    m_pix = nullptr;
     m_validPreview = false;
     setMinimumSize(TQSize(300,300));
     horizontalScrollBar()->setLineStep( 1 );
diff --git a/kipi-plugins/calendar/calselect.cpp b/kipi-plugins/calendar/calselect.cpp
index 74ce3d95..32140aaa 100644
--- a/kipi-plugins/calendar/calselect.cpp
+++ b/kipi-plugins/calendar/calselect.cpp
@@ -51,7 +51,7 @@ CalSelect::CalSelect(KIPI::Interface* interface, TQWidget *parent, const char* n
          : TQWidget(parent, name)
 {
     mwVector_ = new TQPtrVector<MonthWidget>(MAX_MONTHS);
-    monthBoxLayout_ = NULL;
+    monthBoxLayout_ = nullptr;
     setupView( interface );
 }
 
diff --git a/kipi-plugins/findimages/displaycompare.cpp b/kipi-plugins/findimages/displaycompare.cpp
index 2fd8967a..2f41e348 100644
--- a/kipi-plugins/findimages/displaycompare.cpp
+++ b/kipi-plugins/findimages/displaycompare.cpp
@@ -370,8 +370,8 @@ void DisplayCompare::slotDisplayLeft(TQListViewItem * item)
     connect(thumbJob1, TQ_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
             TQ_SLOT(slotGotPreview1(const KFileItem*, const TQPixmap&)));
 
-    FindDuplicateItem *last = NULL;
-    TQFile *f = NULL;
+    FindDuplicateItem *last = nullptr;
+    TQFile *f = nullptr;
     TQFileInfo *fi = new TQFileInfo();
     TQString fn;
 
diff --git a/kipi-plugins/findimages/fuzzycompare.cpp b/kipi-plugins/findimages/fuzzycompare.cpp
index fda0b782..e55f138f 100644
--- a/kipi-plugins/findimages/fuzzycompare.cpp
+++ b/kipi-plugins/findimages/fuzzycompare.cpp
@@ -70,7 +70,7 @@ TQDict < TQPtrVector < TQFile > >  KIPIFindDupplicateImagesPlugin::FuzzyCompare:
 
         sendMessage( m_parent, KIPIFindDupplicateImagesPlugin::Matrix, itemName, 0, true, false );
 
-        if( (is = image_sim_fill_data( itemName )) != NULL )
+        if( (is = image_sim_fill_data( itemName )) != nullptr )
         {
             if ( is->ratio > 1 )
                 list = listRatW;
@@ -93,7 +93,7 @@ TQDict < TQPtrVector < TQFile > >  KIPIFindDupplicateImagesPlugin::FuzzyCompare:
     list = listRatW;
     bool done = false;
 
-    while( list != NULL )
+    while( list )
     {
         if (list->size () != 1)
         {
@@ -148,7 +148,7 @@ TQDict < TQPtrVector < TQFile > >  KIPIFindDupplicateImagesPlugin::FuzzyCompare:
             done = true;
         }
         else
-            list = NULL;
+            list = nullptr;
     }
 
     kdDebug( 51000 ) << "Comparison time: " << debut.msecsTo(TQTime::currentTime()) << endl;
diff --git a/kipi-plugins/htmlexport/xmlutils.h b/kipi-plugins/htmlexport/xmlutils.h
index 3f34e63f..0293f510 100644
--- a/kipi-plugins/htmlexport/xmlutils.h
+++ b/kipi-plugins/htmlexport/xmlutils.h
@@ -70,7 +70,7 @@ public:
 		if (!ptr) return false;
 		mWriter.assign(ptr);
 
-		int rc=xmlTextWriterStartDocument(ptr, NULL, "UTF-8", NULL);
+		int rc=xmlTextWriterStartDocument(ptr, nullptr, "UTF-8", nullptr);
 		if (rc<0) {
 			mWriter.assign(0);
 			return false;
diff --git a/kipi-plugins/picasawebexport/picasawebtalker.cpp b/kipi-plugins/picasawebexport/picasawebtalker.cpp
index 5845ebeb..6e452c6a 100644
--- a/kipi-plugins/picasawebexport/picasawebtalker.cpp
+++ b/kipi-plugins/picasawebexport/picasawebtalker.cpp
@@ -778,7 +778,7 @@ void PicasawebTalker::parseResponseListAlbums(const TQByteArray &data)
     if (!success)
     {
         emit signalGetAlbumsListFailed(i18n("Failed to fetch photoSets List"));
-        m_albumsList = NULL;
+        m_albumsList = nullptr;
     }
     else
     {
diff --git a/kipi-plugins/picasawebexport/picasawebwindow.cpp b/kipi-plugins/picasawebexport/picasawebwindow.cpp
index 22e4795a..e6f4d6ba 100644
--- a/kipi-plugins/picasawebexport/picasawebwindow.cpp
+++ b/kipi-plugins/picasawebexport/picasawebwindow.cpp
@@ -253,7 +253,7 @@ PicasawebWindow::~PicasawebWindow()
     config.writeEntry("Maximum Width",  m_dimensionSpinBox->value());
     config.writeEntry("Image Quality",  m_imageQualitySpinBox->value());
 
-    if(m_urls!=NULL)
+    if(m_urls)
         delete m_urls;
 
     delete m_progressDlg;
@@ -419,13 +419,13 @@ void PicasawebWindow::slotUploadImages()
 {
    if(m_widget->m_currentSelectionButton->isChecked())
    {
-        if (m_urls!=NULL)
+        if (m_urls)
             delete m_urls;
 
         m_urls=new KURL::List(m_interface->currentSelection().images());
    }
 
-   if (m_urls == NULL || m_urls->isEmpty())
+   if (!m_urls || m_urls->isEmpty())
         return;
 
     typedef TQPair<TQString,FPhotoInfo> Pair;
diff --git a/kipi-plugins/printwizard/tphoto.cpp b/kipi-plugins/printwizard/tphoto.cpp
index 73cf26fe..314c4611 100644
--- a/kipi-plugins/printwizard/tphoto.cpp
+++ b/kipi-plugins/printwizard/tphoto.cpp
@@ -61,9 +61,9 @@ TPhoto::TPhoto(int thumbnailSize)
   copies = 1;
 
   filename = "";
-  m_exiv2Iface = NULL;
+  m_exiv2Iface = nullptr;
 
-  m_thumbnail = NULL;
+  m_thumbnail = nullptr;
 
   this->m_thumbnailSize = thumbnailSize;
 }
diff --git a/kipi-plugins/rawconverter/rawdecodingiface.cpp b/kipi-plugins/rawconverter/rawdecodingiface.cpp
index 9b215a70..d01d0796 100644
--- a/kipi-plugins/rawconverter/rawdecodingiface.cpp
+++ b/kipi-plugins/rawconverter/rawdecodingiface.cpp
@@ -288,7 +288,7 @@ bool RawDecodingIface::loadedFromDcraw(const TQString& filePath,
 
             png_color_8 sig_bit;
             png_bytep   row_ptr;
-            png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+            png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
             png_infop info_ptr  = png_create_info_struct(png_ptr);
             png_init_io(png_ptr, f);
             png_set_IHDR(png_ptr, info_ptr, width, height, 8, 
diff --git a/kipi-plugins/sendimages/sendimages.cpp b/kipi-plugins/sendimages/sendimages.cpp
index 271b420c..7a2ec422 100644
--- a/kipi-plugins/sendimages/sendimages.cpp
+++ b/kipi-plugins/sendimages/sendimages.cpp
@@ -781,7 +781,7 @@ bool SendImages::copyImageProcess(const TQString &oldFilePath, const TQString &D
 
         //deallocate buffer
         delete[] buffer;
-        buffer = NULL;
+        buffer = nullptr;
         return true;
 }
 
diff --git a/kipi-plugins/slideshow/slideshow.cpp b/kipi-plugins/slideshow/slideshow.cpp
index 8c0c4938..770b4e59 100644
--- a/kipi-plugins/slideshow/slideshow.cpp
+++ b/kipi-plugins/slideshow/slideshow.cpp
@@ -753,7 +753,7 @@ int SlideShow::effectMeltdown(bool aInit)
     if (done)
     {
         delete [] m_intArray;
-        m_intArray = NULL;
+        m_intArray = nullptr;
         return -1;
     }
 
diff --git a/kipi-plugins/sync/libkipi2/collection.cpp b/kipi-plugins/sync/libkipi2/collection.cpp
index 97098107..3395d347 100644
--- a/kipi-plugins/sync/libkipi2/collection.cpp
+++ b/kipi-plugins/sync/libkipi2/collection.cpp
@@ -47,8 +47,8 @@ template <class T> void DestroyItemList(ItemList& items)
 Collection::Collection(Collection* pParent, unsigned int features)
  : mpParent(pParent),
    mFeatures(features),
-   mpSubCollections(NULL),
-   mpItems(NULL)
+   mpSubCollections(nullptr),
+   mpItems(nullptr)
 {
 }
 
diff --git a/kipi-plugins/sync/libkipi2/collection.h b/kipi-plugins/sync/libkipi2/collection.h
index 8ebd4d09..fac9380c 100644
--- a/kipi-plugins/sync/libkipi2/collection.h
+++ b/kipi-plugins/sync/libkipi2/collection.h
@@ -50,7 +50,7 @@ namespace KIPI2
   {
   public:
     // ctor/dtor
-    Collection(Collection* pParent = NULL, unsigned int mFeatures = 0);
+    Collection(Collection* pParent = nullptr, unsigned int mFeatures = 0);
     
     // State whether a given Feature is supported.
     bool Supports(enum Features feature);
diff --git a/kipi-plugins/sync/plugin_sync.cpp b/kipi-plugins/sync/plugin_sync.cpp
index 3e12efda..b91780dc 100644
--- a/kipi-plugins/sync/plugin_sync.cpp
+++ b/kipi-plugins/sync/plugin_sync.cpp
@@ -48,7 +48,7 @@ Plugin_Sync::Plugin_Sync(TQObject *parent,
                          const char*,
                          const TQStringList&)
   : KIPI::Plugin(Factory::instance(), parent, "Sync"),
-      mpSinks(NULL)
+      mpSinks(nullptr)
 {
   kdDebug(51001) << "Plugin_Sync plugin loaded"
                  << endl;
diff --git a/kipi-plugins/sync/sink.cpp b/kipi-plugins/sync/sink.cpp
index a3b1fa6c..45f873f8 100644
--- a/kipi-plugins/sync/sink.cpp
+++ b/kipi-plugins/sync/sink.cpp
@@ -92,7 +92,7 @@ TQString Sink2::TypeDescription() { return "Sink2"; }
 KIPI2::CollectionList* Sink2::getCollections()
 {
   //KIPI2::Collection* tmp = new KIPI2::Collection;
-  return (KIPI2::CollectionList*) NULL;
+  return nullptr;
 }
 
 void Sink2::Save(TDEConfig*, TDEWallet::Wallet*)
@@ -104,7 +104,7 @@ void test()
 {
   SinkFactory::Register("Sink2", SinkCreator<Sink2>);
   
-  Sink* p_tmp = SinkFactory::Create("Sink2", 1, "Something", NULL, NULL);
+  Sink* p_tmp = SinkFactory::Create("Sink2", 1, "Something", nullptr, nullptr);
   p_tmp = p_tmp;
 }
 }
diff --git a/kipi-plugins/sync/sinkfactory.cpp b/kipi-plugins/sync/sinkfactory.cpp
index d9fec876..107d069c 100644
--- a/kipi-plugins/sync/sinkfactory.cpp
+++ b/kipi-plugins/sync/sinkfactory.cpp
@@ -38,7 +38,7 @@ bool SinkFactory::Register(TQString type, SinkProxy* pSinkProxy)
 Sink* SinkFactory::Create(TQString type, unsigned int sinkId, TQString name, TDEConfig* pConfig, TDEWallet::Wallet* pWallet)
 {
   if (!mSinkProxies.contains(type))
-    return NULL;
+    return nullptr;
   
   return (*(mSinkProxies[type]))(sinkId, name, pConfig, pWallet);
 }
diff --git a/kipi-plugins/sync/sinks.cpp b/kipi-plugins/sync/sinks.cpp
index a0669902..3d6fbf11 100644
--- a/kipi-plugins/sync/sinks.cpp
+++ b/kipi-plugins/sync/sinks.cpp
@@ -52,10 +52,10 @@ void SinkTQListViewItem::Refresh()
 
 
 Sinks::Sinks()
- : mpWallet(NULL),
+ : mpWallet(nullptr),
    mMaxSinkId(0)
 {
-  TDEWallet::Wallet* p_wallet = NULL;
+  TDEWallet::Wallet* p_wallet = nullptr;
   mpWallet = TDEWallet::Wallet::openWallet(TDEWallet::Wallet::NetworkWallet(),
                                          tdeApp->activeWindow()->winId(),
                                          TDEWallet::Wallet::Synchronous);
@@ -120,7 +120,7 @@ void Sinks::Load()
 
 Sink* Sinks::Add(TQString type, TQString name)
 {
-  Sink* p_sink = SinkFactory::Create(type, ++mMaxSinkId, name, NULL, NULL);
+  Sink* p_sink = SinkFactory::Create(type, ++mMaxSinkId, name, nullptr, nullptr);
   // This actually needs to be a call to sync factory creation... pass in the new SinkId
   mSinks.append(p_sink);
   return p_sink;
@@ -144,7 +144,7 @@ void Sinks::Save()
   config.deleteGroup("Sync Sinks");
   config.setGroup("Sync Sinks");
 
-  TDEWallet::Wallet* p_wallet = NULL;
+  TDEWallet::Wallet* p_wallet = nullptr;
   if (mpWallet)
   {
     if (mpWallet->hasFolder("KIPISyncPlugin"))
diff --git a/kipi-plugins/sync/sinks/gallery/gallerysink.cpp b/kipi-plugins/sync/sinks/gallery/gallerysink.cpp
index 9a2ba026..c376fa7f 100644
--- a/kipi-plugins/sync/sinks/gallery/gallerysink.cpp
+++ b/kipi-plugins/sync/sinks/gallery/gallerysink.cpp
@@ -67,7 +67,7 @@ GallerySink::~GallerySink()
 
 const KIPI2::CollectionList* GallerySink::getCollections()
 {
-  return NULL;
+  return nullptr;
 }
   
 void GallerySink::Save(TDEConfig* pConfig, TDEWallet::Wallet* pWallet)
-- 
cgit v1.2.3

