From 42f7e684a4e928b960563911c79182f5fb30a0fd Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 20 Sep 2026 19:51:25 -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/commandobutton.cpp   |  2 +-
 src/configdialogimpl.cpp | 26 +++++++++++++-------------
 src/configuration.cpp    |  6 +++---
 src/configuration.h      |  2 +-
 src/menu.cpp             |  2 +-
 src/menu.h               |  2 +-
 src/menulistviewitem.cpp |  6 +++---
 7 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/commandobutton.cpp b/src/commandobutton.cpp
index d67502b..55cd264 100644
--- a/src/commandobutton.cpp
+++ b/src/commandobutton.cpp
@@ -32,7 +32,7 @@ CommandoButton::CommandoButton(TQWidget* parent, unsigned short rad)
 Menu* CommandoButton::execute( )
 {
     KRun::runCommand(command());
-    return NULL;
+    return nullptr;
 }
 
 /*
diff --git a/src/configdialogimpl.cpp b/src/configdialogimpl.cpp
index 4543ebb..cbc9dcd 100644
--- a/src/configdialogimpl.cpp
+++ b/src/configdialogimpl.cpp
@@ -143,12 +143,12 @@ void ConfigDialogImpl::slotChangeListView(const TQString& appname)
 void ConfigDialogImpl::slotButtonDownPressed()
 {
     TQListViewItem* item = curListView->selectedItem();
-    if(item!=NULL){
+    if(item!=nullptr){
         TQListViewItem* below = item->itemBelow();
-        while((below!=NULL)&&(item->parent()!=below->parent())){
+        while((below!=nullptr)&&(item->parent()!=below->parent())){
             below=below->itemBelow();
         }
-        if(below!=NULL){
+        if(below!=nullptr){
             item->moveItem(below);
         }
     }
@@ -158,12 +158,12 @@ void ConfigDialogImpl::slotButtonDownPressed()
 void ConfigDialogImpl::slotButtonUpPressed()
 {
     TQListViewItem* item = curListView->selectedItem();
-    if(item!=NULL){
+    if(item!=nullptr){
         TQListViewItem* above = item->itemAbove();
-        while((above!=NULL)&&(item->parent()!=above->parent())){
+        while((above!=nullptr)&&(item->parent()!=above->parent())){
             above=above->itemAbove();
         }
-        if(above!=NULL){
+        if(above!=nullptr){
             above->moveItem(item);
         }
     }
@@ -249,7 +249,7 @@ void ConfigDialogImpl::slotMenuViewClicked(TQListViewItem* item)
         commandoEdit->setEnabled(false);
         remove->setEnabled(false);
     } else {
-        if(temp->iconPath()!=NULL){
+        if(temp->iconPath()!=nullptr){
             iconButton->setIcon(temp->iconPath());
         } else {
             iconButton->resetIcon();
@@ -277,7 +277,7 @@ void ConfigDialogImpl::slotRemoveClicked()
     TQListViewItem* temp = curListView->selectedItem()->nextSibling();
     delete curListView->selectedItem();
     curListView->setSelected(temp,true);
-    if(temp==NULL){
+    if(temp==nullptr){
         remove->setEnabled(false);
     }
     setChanged(true);
@@ -297,15 +297,15 @@ void ConfigDialogImpl::slotAddMenuClicked()
 
 void ConfigDialogImpl::createEntry(const TQString& kind)
 {
-    TQListViewItem* parent=NULL;
+    TQListViewItem* parent=nullptr;
     TQListViewItem* newItem;
     MenuListViewItem* selected =static_cast<MenuListViewItem*>(curListView->selectedItem());
     MenuListViewItem::ItemType type;
-    if(selected!=NULL){
+    if(selected!=nullptr){
         if(selected->type()==MenuListViewItem::Menu){
             parent=selected;
             selected=selected->lastChild();
-        } else if(selected->parent()!=NULL){
+        } else if(selected->parent()!=nullptr){
             parent=selected->parent();
         }
     } else {
@@ -318,7 +318,7 @@ void ConfigDialogImpl::createEntry(const TQString& kind)
         type=MenuListViewItem::Button;
     }
 
-    if(parent!=NULL){
+    if(parent!=nullptr){
         newItem=new MenuListViewItem(parent,selected,kind,type);
     } else {
         newItem=new MenuListViewItem(curListView,selected,kind,type);
@@ -335,7 +335,7 @@ void ConfigDialogImpl::createEntry(const TQString& kind)
 
 void ConfigDialogImpl::slotListBoxClicked(TQListBoxItem* item)
 {
-    if(item!=NULL){
+    if(item!=nullptr){
         if(item->text()=="Menu"){
             pages->raiseWidget(0);
         } else if(item->text()=="Shortcuts"){
diff --git a/src/configuration.cpp b/src/configuration.cpp
index ba7b2c4..a2adebe 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -31,7 +31,7 @@
 #include "menulistviewitem.h"
 
 Config::Config()
-    :mTintColor(TQt::black),mOpacity(0.2f),mScheme("none"),mMenuButtonSize(32),mNavButtonSize(32),mMenuRadius(132),doc(NULL)
+    :mTintColor(TQt::black),mOpacity(0.2f),mScheme("none"),mMenuButtonSize(32),mNavButtonSize(32),mMenuRadius(132),doc(nullptr)
 {
     mConfigPath = locate("data", "kommando/kommandorc");
     kdDebug() << "kommandorc located: " << mConfigPath << endl;
@@ -159,8 +159,8 @@ void Config::fromConfigDlg(KommandoViewList& listViews )
 TQListViewItem* lastChild(TQListView* view)
 {
     TQListViewItem* temp=view->firstChild();
-    TQListViewItem* item=NULL;
-    while(temp!=NULL){
+    TQListViewItem* item=nullptr;
+    while(temp!=nullptr){
         item=temp;
         temp=temp->nextSibling();
     }
diff --git a/src/configuration.h b/src/configuration.h
index 4e3e232..38a6269 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -85,7 +85,7 @@ class TDE_EXPORT Config{
         TQDomDocument* doc;
 
         //Factory functions
-        Menu* menuFromXML(const TQDomElement& ownNode, Kommando* buttonParent, Menu* parent=NULL);
+        Menu* menuFromXML(const TQDomElement& ownNode, Kommando* buttonParent, Menu* parent=nullptr);
         CommandoButton* comButtonFromXML(const TQDomElement& ownNode, Kommando* parent);
         TQListView* newListView(TQWidget * parent, const char* name);
 
diff --git a/src/menu.cpp b/src/menu.cpp
index e961f69..7d9a6a7 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -99,7 +99,7 @@ void Menu::selectButton( int num )
 TQButton * Menu::selectedButton( )
 {
     if(mSelectedButtonNum<0){
-        return NULL;
+        return nullptr;
     }
     return find(mSelectedButtonNum);
 }
diff --git a/src/menu.h b/src/menu.h
index 951c4a5..d8d3c5d 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -33,7 +33,7 @@ class Menu : public TQButtonGroup
 {
     TQ_OBJECT
     public:
-        Menu(Menu* parentMenu=NULL, const TQString& appName="");
+        Menu(Menu* parentMenu=nullptr, const TQString& appName="");
         virtual ~Menu();
 
         virtual Menu* parentMenu(){ return mParentMenu; }
diff --git a/src/menulistviewitem.cpp b/src/menulistviewitem.cpp
index e3c575f..c1d1d1b 100644
--- a/src/menulistviewitem.cpp
+++ b/src/menulistviewitem.cpp
@@ -40,7 +40,7 @@ MenuListViewItem::~MenuListViewItem()
 void MenuListViewItem::setIconPath(const TQString& path)
 {
 	mIconPath = path;
-	if(mIconPath!=NULL)
+	if(mIconPath!=nullptr)
 	{
 		setPixmap(0,SmallIcon(mIconPath));
 	}
@@ -49,8 +49,8 @@ void MenuListViewItem::setIconPath(const TQString& path)
 MenuListViewItem * MenuListViewItem::lastChild( )
 {
 	MenuListViewItem* temp=static_cast<MenuListViewItem*>(firstChild());
-	MenuListViewItem* child=NULL;
-	while(temp!=NULL){
+	MenuListViewItem* child=nullptr;
+	while(temp!=nullptr){
 		child=temp;
 		temp=static_cast<MenuListViewItem*>(temp->nextSibling());
 	}
-- 
cgit v1.2.3

