From 498675cf116e58ba0a7dca40b31fed63a0b06e7f Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 3 Oct 2026 17:43:48 -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>
---
 kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp      |  2 +-
 kate/cppsymbolviewer/cpp_parser.cpp                  |  6 +++---
 kate/cppsymbolviewer/plugin_katesymbolviewer.cpp     |  4 ++--
 kate/cppsymbolviewer/tcl_parser.cpp                  |  6 +++---
 kate/kpybrowser/kpybrowser.cpp                       | 14 +++++++-------
 kate/kpybrowser/pybrowse_part.cpp                    |  4 ++--
 kate/snippets/plugin_katesnippets.cpp                | 12 ++++++------
 kate/textfilter/plugin_katetextfilter.cpp            |  2 +-
 kicker-applets/kbinaryclock/kbinaryclock.cpp         |  2 +-
 kicker-applets/ktimemon/sample.cpp                   |  8 ++++----
 konq-plugins/dirfilter/dirfilterplugin.cpp           |  2 +-
 konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp |  8 ++++----
 konq-plugins/sidebar/newsticker/sidebar_news.cpp     |  4 ++--
 noatun-plugins/lyrics/historymanager.h               |  2 +-
 noatun-plugins/oblique/base.cpp                      |  4 ++--
 noatun-plugins/tippercanoe/main.cpp                  |  2 +-
 noatun-plugins/tyler/main.cpp                        |  4 ++--
 tdefile-plugins/cert/tdefile_cert.cpp                |  8 ++++----
 18 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp b/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp
index bccf776..833c8d9 100644
--- a/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp
+++ b/kaddressbook-plugins/xxports/gmx/gmx_xxport.cpp
@@ -291,7 +291,7 @@ void GMXXXPort::doExport( TQFile *fp, const TDEABC::AddresseeList &list )
        "Company,Department,Change_date,Preferred,Status\n";
 
   no = 1;
-  while ( (addr = addrMap[no]) != NULL ) {
+  while ( (addr = addrMap[no]) != nullptr ) {
     for (unsigned int record_id=0; record_id<3; record_id++) {
 
 	TDEABC::Address address;
diff --git a/kate/cppsymbolviewer/cpp_parser.cpp b/kate/cppsymbolviewer/cpp_parser.cpp
index cf43b4d..418493a 100644
--- a/kate/cppsymbolviewer/cpp_parser.cpp
+++ b/kate/cppsymbolviewer/cpp_parser.cpp
@@ -31,9 +31,9 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
  TQPixmap sct( ( const char** ) struct_xpm );
  TQPixmap mcr( ( const char** ) macro_xpm );
  TQPixmap mtd( ( const char** ) method_xpm );
- TQListViewItem *node = NULL;
- TQListViewItem *mcrNode = NULL, *sctNode = NULL, *clsNode = NULL, *mtdNode = NULL;
- TQListViewItem *lastMcrNode = NULL, *lastSctNode = NULL, *lastClsNode = NULL, *lastMtdNode = NULL;
+ TQListViewItem *node = nullptr;
+ TQListViewItem *mcrNode = nullptr, *sctNode = nullptr, *clsNode = nullptr, *mtdNode = nullptr;
+ TQListViewItem *lastMcrNode = nullptr, *lastSctNode = nullptr, *lastClsNode = nullptr, *lastMtdNode = nullptr;
 
 
  Kate::Document *kv = win->viewManager()->activeView()->getDoc();
diff --git a/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp b/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp
index cb081ea..71931a4 100644
--- a/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp
+++ b/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp
@@ -236,9 +236,9 @@ void KatePluginSymbolViewerView::goToSymbol(TQListViewItem *it)
     return;
 
   kdDebug(13000)<<"Slot Activated at pos: "<<symbols->itemIndex(it) <<endl;
-  kv->gotoLineNumber(it->text(1).toInt(NULL, 10) + 10);
+  kv->gotoLineNumber(it->text(1).toInt(nullptr, 10) + 10);
   kv->setFocus();
-  kv->gotoLineNumber(it->text(1).toInt(NULL, 10));
+  kv->gotoLineNumber(it->text(1).toInt(nullptr, 10));
 }
 
 KatePluginSymbolViewer::KatePluginSymbolViewer( TQObject* parent, const char* name, const TQStringList& )
diff --git a/kate/cppsymbolviewer/tcl_parser.cpp b/kate/cppsymbolviewer/tcl_parser.cpp
index d769580..a31bbdf 100644
--- a/kate/cppsymbolviewer/tcl_parser.cpp
+++ b/kate/cppsymbolviewer/tcl_parser.cpp
@@ -29,9 +29,9 @@ void KatePluginSymbolViewerView::parseTclSymbols(void)
  uint i, j, args_par = 0, graph = 0;
  char block = 0, parse_func = 0;
 
- TQListViewItem *node = NULL;
- TQListViewItem *mcrNode = NULL, *clsNode = NULL;
- TQListViewItem *lastMcrNode = NULL, *lastClsNode = NULL;
+ TQListViewItem *node = nullptr;
+ TQListViewItem *mcrNode = nullptr, *clsNode = nullptr;
+ TQListViewItem *lastMcrNode = nullptr, *lastClsNode = nullptr;
 
  TQPixmap mcr( ( const char** ) macro_xpm );
  TQPixmap cls( ( const char** ) class_xpm );
diff --git a/kate/kpybrowser/kpybrowser.cpp b/kate/kpybrowser/kpybrowser.cpp
index f0e95cd..8e28251 100644
--- a/kate/kpybrowser/kpybrowser.cpp
+++ b/kate/kpybrowser/kpybrowser.cpp
@@ -167,7 +167,7 @@ static const char *container_xpm[] = {
 void
 getOpenNodes (TQValueList < TQString > *open_nodes, PyBrowseNode * node)
 {
-  if (node == NULL)
+  if (!node)
     return;
   if (node->isOpen ())
     {
@@ -247,9 +247,9 @@ KPyBrowser::parseText (TQString & pytext)
   TQString *line;
   TQString class_name, method_name, function_name, class_sig, method_sig,
     function_sig;
-  PyBrowseNode *last_class_node = NULL;
-  PyBrowseNode *last_method_node = NULL;
-  PyBrowseNode *last_function_node = NULL;
+  PyBrowseNode *last_class_node = nullptr;
+  PyBrowseNode *last_method_node = nullptr;
+  PyBrowseNode *last_function_node = nullptr;
 
   TQValueList < TQString > open_nodes;
   getOpenNodes (&open_nodes, class_root);
@@ -258,11 +258,11 @@ KPyBrowser::parseText (TQString & pytext)
 
   int line_no, state = 0;
 
-  if (class_root != NULL)
+  if (class_root)
     {
       delete class_root;
     }
-  if (function_root != NULL)
+  if (function_root)
     {
       delete function_root;
     }
@@ -354,7 +354,7 @@ void
 KPyBrowser::tip (const TQPoint & p, TQRect & r, TQString & str)
 {
   TQListViewItem *item = (TQListViewItem *) itemAt (p);
-  if (item == NULL)
+  if (!item)
     {
       str = "";
       return;
diff --git a/kate/kpybrowser/pybrowse_part.cpp b/kate/kpybrowser/pybrowse_part.cpp
index 6958754..f541def 100644
--- a/kate/kpybrowser/pybrowse_part.cpp
+++ b/kate/kpybrowser/pybrowse_part.cpp
@@ -116,10 +116,10 @@ void PluginViewPyBrowse::slotSelected(TQString name, int line)
 void PluginViewPyBrowse::slotUpdatePyBrowser()
 {
   Kate::ViewManager *viewManager = win->viewManager();
-  if (viewManager == NULL)
+  if (!viewManager)
   	return;
   Kate::View *view = viewManager->activeView();
-  if (view == NULL)
+  if (!view)
   	return;
   TQString pytext(view->getDoc()->text());
   kpybrowser->parseText(pytext);
diff --git a/kate/snippets/plugin_katesnippets.cpp b/kate/snippets/plugin_katesnippets.cpp
index 540a8f8..ab4a5f9 100644
--- a/kate/snippets/plugin_katesnippets.cpp
+++ b/kate/snippets/plugin_katesnippets.cpp
@@ -144,7 +144,7 @@ void KatePluginSnippets::removeView(Kate::MainWindow *win) {
  */
 void KatePluginSnippetsView::slot_lvSnippetsSelectionChanged(TQListViewItem  * item) {
   CSnippet *snippet;
-  if ( (snippet = findSnippetByListViewItem(item))!= NULL ) {
+  if ( (snippet = findSnippetByListViewItem(item)) != nullptr ) {
     teSnippetText->setText(snippet->getValue());
   }
 
@@ -160,7 +160,7 @@ void KatePluginSnippetsView::slot_lvSnippetsClicked (TQListViewItem  * item) {
   CSnippet *snippet;
 
   if (kv) {
-    if ( (snippet = findSnippetByListViewItem(item))!= NULL ) {
+    if ( (snippet = findSnippetByListViewItem(item)) != nullptr ) {
       TQString sText = snippet->getValue();
       TQString sSelection = "";
 
@@ -188,7 +188,7 @@ void KatePluginSnippetsView::slot_lvSnippetsClicked (TQListViewItem  * item) {
  */
 void KatePluginSnippetsView::slot_lvSnippetsItemRenamed(TQListViewItem *lvi,int /*col*/, const TQString& text) {
   CSnippet *snippet;
-  if ( (snippet = findSnippetByListViewItem(lvi)) != NULL ) {
+  if ( (snippet = findSnippetByListViewItem(lvi)) != nullptr ) {
     snippet->setKey( text );
     writeConfig();
   }
@@ -213,7 +213,7 @@ void KatePluginSnippetsView::slot_btnNewClicked() {
 void KatePluginSnippetsView::slot_btnSaveClicked() {
   CSnippet *snippet;
   TQListViewItem *lvi = lvSnippets->selectedItem();
-  if ( (snippet = findSnippetByListViewItem(lvi)) != NULL ) {
+  if ( (snippet = findSnippetByListViewItem(lvi)) != nullptr ) {
     snippet->setValue(teSnippetText->text() );
     writeConfig();
   }
@@ -228,7 +228,7 @@ void KatePluginSnippetsView::slot_btnDeleteClicked() {
   TQListViewItem *lvi = lvSnippets->selectedItem();
 
 
-  if ( (snippet = findSnippetByListViewItem(lvi)) != NULL ) {
+  if ( (snippet = findSnippetByListViewItem(lvi)) != nullptr ) {
     lvSnippets->takeItem(lvi);
     lSnippets.remove(snippet);
   }
@@ -306,7 +306,7 @@ void KatePluginSnippetsView::writeConfig() {
  * @return
  */
 CSnippet* KatePluginSnippetsView::findSnippetByListViewItem(TQListViewItem *item) {
-  CSnippet *snippet = NULL;
+  CSnippet *snippet = nullptr;
   for ( snippet = lSnippets.first(); snippet; snippet = lSnippets.next() ) {
     if ( snippet->getListViewItem() == item)
       break;
diff --git a/kate/textfilter/plugin_katetextfilter.cpp b/kate/textfilter/plugin_katetextfilter.cpp
index c5fe261..67349e9 100644
--- a/kate/textfilter/plugin_katetextfilter.cpp
+++ b/kate/textfilter/plugin_katetextfilter.cpp
@@ -47,7 +47,7 @@ class PluginView : public KXMLGUIClient
 PluginKateTextFilter::PluginKateTextFilter( TQObject* parent, const char* name, const TQStringList& )
   : Kate::Plugin ( (Kate::Application *)parent, name ),
     Kate::Command(),
-    m_pFilterShellProcess (NULL)
+    m_pFilterShellProcess (nullptr)
 {
   Kate::Document::registerCommand( this );
 }
diff --git a/kicker-applets/kbinaryclock/kbinaryclock.cpp b/kicker-applets/kbinaryclock/kbinaryclock.cpp
index c622deb..5eba656 100644
--- a/kicker-applets/kbinaryclock/kbinaryclock.cpp
+++ b/kicker-applets/kbinaryclock/kbinaryclock.cpp
@@ -118,7 +118,7 @@ void SettingsImp::updatePreview(){
  */
 KBinaryClock::KBinaryClock(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name)
 	: KPanelApplet(configFile, type, actions, parent, name), ledWidth(6),
-	  _calendar(NULL), _disableCalendar(false), 
+	  _calendar(nullptr), _disableCalendar(false), 
 		prefs( new Prefs(sharedConfig())), m_tooltip(this)
 {
 	prefs->readConfig();
diff --git a/kicker-applets/ktimemon/sample.cpp b/kicker-applets/ktimemon/sample.cpp
index c8f2554..57ec079 100644
--- a/kicker-applets/ktimemon/sample.cpp
+++ b/kicker-applets/ktimemon/sample.cpp
@@ -252,7 +252,7 @@ void KSample::readSample()
             char cpuname[10];
             sprintf(cpuname, "cpu%d", l);
 
-            if ((p = strstr(buffer, cpuname)) == NULL) break;
+            if (!(p = strstr(buffer, cpuname))) break;
 
             unsigned long u, n, k, i;
             ok = sscanf(p, "cpu%*d %lu %lu %lu %lu", &u, &n, &k, &i);
@@ -394,7 +394,7 @@ void KSample::readSample()
     mib[0] = CTL_HW;
     mib[1] = HW_NCPU;
     len = sizeof(ncpu);
-    if (sysctl(mib, 2, &ncpu, &len, NULL, 0) == -1) {
+    if (sysctl(mib, 2, &ncpu, &len, nullptr, 0) == -1) {
         fatal(i18n("Unable to get the number of CPUs configured.\n"
                    "The diagnostics are '%1'.\n"
                    "Please contact the maintainer at http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(strerror(errno)));
@@ -406,7 +406,7 @@ void KSample::readSample()
     mib[1] = KERN_CP_TIME;
     uint64_t cp_time[CPUSTATES];
     len = sizeof(cp_time);
-    if (sysctl(mib, 2, cp_time, &len, NULL, 0) < 0) {
+    if (sysctl(mib, 2, cp_time, &len, nullptr, 0) < 0) {
         fatal(i18n("Unable to get CPUSTATES.\n"
                    "The diagnostics are '%1'.\n"
                    "Please contact the maintainer at http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(strerror(errno)));
@@ -423,7 +423,7 @@ void KSample::readSample()
 
     struct uvmexp_sysctl u;
     len = sizeof(u);
-    if (sysctl(mib, 2, &u, &len, NULL, 0) < 0) {
+    if (sysctl(mib, 2, &u, &len, nullptr, 0) < 0) {
         fatal(i18n("Unable to get system wide vertual memory statistics.\n"
                    "The diagnostics are '%1'.\n"
                    "Please contact the maintainer at http://bugs.trinitydesktop.org/ who will try to sort this out.").arg(strerror(errno)));
diff --git a/konq-plugins/dirfilter/dirfilterplugin.cpp b/konq-plugins/dirfilter/dirfilterplugin.cpp
index dd1b21d..decd6f0 100644
--- a/konq-plugins/dirfilter/dirfilterplugin.cpp
+++ b/konq-plugins/dirfilter/dirfilterplugin.cpp
@@ -191,7 +191,7 @@ DirFilterPlugin::DirFilterPlugin (TQObject* parent, const char* name,
   }
   else
   {
-    m_searchWidget=NULL;
+    m_searchWidget=nullptr;
   }
 
   if ( m_searchWidget )
diff --git a/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp b/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp
index f4dc6d7..6a51b11 100644
--- a/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp
+++ b/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp
@@ -181,7 +181,7 @@ namespace KSB_News {
 
   void NSStackTabWidget::buttonClicked() {
     TQPushButton *pb = (TQPushButton*)sender();
-    NSPanel *nsp = NULL;
+    NSPanel *nsp = nullptr;
 
     // Which NSPanel belongs to pb
     TQPtrDictIterator<TQWidget> it(pagesheader);
@@ -221,7 +221,7 @@ namespace KSB_News {
       const TQPixmap *pm = pb->pixmap();
       if ( ! pm ) {
         // Which NSPanel belongs to pb
-        NSPanel *nsp = NULL;
+        NSPanel *nsp = nullptr;
         TQPtrDictIterator<TQWidget> it(pagesheader);
         for (; it.current(); ++it) {
           TQPushButton *currentWidget = (TQPushButton *)it.current();
@@ -299,7 +299,7 @@ namespace KSB_News {
 
 
   void NSStackTabWidget::slotRefresh() {
-    NSPanel *nsp = NULL;
+    NSPanel *nsp = nullptr;
 
     // find appendant NSPanel
     TQPtrDictIterator<TQWidget> it(pagesheader);
@@ -318,7 +318,7 @@ namespace KSB_News {
 
 
   void NSStackTabWidget::slotClose() {
-    NSPanel *nsp = NULL;
+    NSPanel *nsp = nullptr;
     // find appendant NSPanel
     TQPtrDictIterator<TQWidget> it(pagesheader);
     for (; it.current(); ++it) {
diff --git a/konq-plugins/sidebar/newsticker/sidebar_news.cpp b/konq-plugins/sidebar/newsticker/sidebar_news.cpp
index f8c1ee8..284b18f 100644
--- a/konq-plugins/sidebar/newsticker/sidebar_news.cpp
+++ b/konq-plugins/sidebar/newsticker/sidebar_news.cpp
@@ -136,7 +136,7 @@ namespace KSB_News {
 ///////// helper methods ///////////////////////////////////////////////////
 
   NSPanel *KonqSidebar_News::getNSPanelByKey(TQString key) {
-    NSPanel *nsp = NULL, *current_nsp;
+    NSPanel *nsp = nullptr, *current_nsp;
 
     for (current_nsp = nspanelptrlist.first(); current_nsp;
          current_nsp = nspanelptrlist.next()) {
@@ -203,7 +203,7 @@ namespace KSB_News {
   void KonqSidebar_News::slotArticleItemExecuted(TQListBoxItem *item) {
     if (!item) return;
 
-    NSPanel *current_nspanel, *nspanel = NULL;
+    NSPanel *current_nspanel, *nspanel = nullptr;
     for (current_nspanel = nspanelptrlist.first(); current_nspanel;
          current_nspanel = nspanelptrlist.next()) {
       if (current_nspanel->listbox() == item->listBox())
diff --git a/noatun-plugins/lyrics/historymanager.h b/noatun-plugins/lyrics/historymanager.h
index 332897d..5923f73 100644
--- a/noatun-plugins/lyrics/historymanager.h
+++ b/noatun-plugins/lyrics/historymanager.h
@@ -9,7 +9,7 @@ class HistoryManager : public TQObject {
   TQ_OBJECT
   
   public:
-    HistoryManager(TQObject *parent = NULL);
+    HistoryManager(TQObject *parent = nullptr);
     ~HistoryManager();
     KURL back();
     KURL forward();
diff --git a/noatun-plugins/oblique/base.cpp b/noatun-plugins/oblique/base.cpp
index 3cb5633..37795c6 100644
--- a/noatun-plugins/oblique/base.cpp
+++ b/noatun-plugins/oblique/base.cpp
@@ -45,7 +45,7 @@ Base::Base(const TQString &file)
 	bool create = true;
 	if (d->db.open(
 #if DB_VERSION_MINOR > 0 && DB_VERSION_MAJOR >= 4
-			NULL,
+			nullptr,
 #endif
 			filename,
 			0, DB_BTREE, DB_NOMMAP, 0
@@ -74,7 +74,7 @@ Base::Base(const TQString &file)
 		TQFile(filename).remove();
 		d->db.open(
 #if DB_VERSION_MINOR > 0 && DB_VERSION_MAJOR >= 4
-				NULL,
+				nullptr,
 #endif
 				filename,0, DB_BTREE, DB_NOMMAP|DB_CREATE,0
 			);
diff --git a/noatun-plugins/tippercanoe/main.cpp b/noatun-plugins/tippercanoe/main.cpp
index 46820e7..0d52b9b 100644
--- a/noatun-plugins/tippercanoe/main.cpp
+++ b/noatun-plugins/tippercanoe/main.cpp
@@ -110,7 +110,7 @@ Core::~Core()
 
 bool Core::go()
 {
-	time_t timer = time(NULL);
+	time_t timer = time(nullptr);
 
 	printf("%u\n", static_cast<SdlScreen *>(screen)->winID());
 	fflush(stdout);
diff --git a/noatun-plugins/tyler/main.cpp b/noatun-plugins/tyler/main.cpp
index 4cab74e..5cafacb 100644
--- a/noatun-plugins/tyler/main.cpp
+++ b/noatun-plugins/tyler/main.cpp
@@ -77,7 +77,7 @@ int main(int, char **)
 	printf("%u\n", winID());
 	fflush(stdout);
 	init_renderer2();
-	thread = SDL_CreateThread((int (*)(void *))renderer, NULL);
+	thread = SDL_CreateThread((int (*)(void *))renderer, nullptr);
 
 	fd_set set;
 	struct timeval tv;
@@ -96,5 +96,5 @@ int main(int, char **)
 		usleep(5);
 	}
 	/*fprintf(stderr,"exiting main()\n");*/
-	SDL_WaitThread(thread, NULL);
+	SDL_WaitThread(thread, nullptr);
 }
diff --git a/tdefile-plugins/cert/tdefile_cert.cpp b/tdefile-plugins/cert/tdefile_cert.cpp
index 06e2b50..f8df634 100644
--- a/tdefile-plugins/cert/tdefile_cert.cpp
+++ b/tdefile-plugins/cert/tdefile_cert.cpp
@@ -95,10 +95,10 @@ void CertPlugin::appendDNItems(KFileMetaInfoGroup &group, const TQString &DN)
 
 static KSSLCertificate *readCertFromFile(const TQString &path)
 {
-  KSSLCertificate *ret = NULL;
+  KSSLCertificate *ret = nullptr;
   
   TQFile file(path);
-  if (!file.open(IO_ReadOnly)) return NULL;
+  if (!file.open(IO_ReadOnly)) return nullptr;
   TQByteArray file_data = file.readAll();
   file.close();
   
@@ -124,13 +124,13 @@ static KSSLCertificate *readCertFromFile(const TQString &path)
   // still didn't work. Assume the file was in DER (binary) encoding
   unsigned char *p = (unsigned char*) file_data.data();
   KOSSL::self()->ERR_clear_error();
-  X509 *x = KOSSL::self()->d2i_X509(NULL, &p, file_data.size());
+  X509 *x = KOSSL::self()->d2i_X509(nullptr, &p, file_data.size());
   if (x) {
     ret = KSSLCertificate::fromX509(x);
     KOSSL::self()->X509_free(x);
     return ret;
   }  
-  else return NULL;
+  else return nullptr;
 }
 
 bool CertPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
-- 
cgit v1.2.3

