From b04bc8967c563bff30a25c3403bd0e0a16a2d513 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 20 Sep 2026 19:52:49 -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>
---
 src/configdialogimpl.cpp | 14 +++++++-------
 src/configdialogimpl.h   |  2 +-
 src/configuration.cpp    | 10 +++++-----
 src/kcmkommando.cpp      |  8 ++++----
 src/kcmkommando.h        |  2 +-
 src/kommando.cpp         | 18 +++++++++---------
 src/kommandod.cpp        |  2 +-
 src/kommandoview.cpp     | 12 ++++++------
 src/menu.cpp             |  4 ++--
 src/roundbutton.h        |  4 ++--
 src/servicemenu.cpp      |  8 ++++----
 src/servicemenu.h        |  6 +++---
 12 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/src/configdialogimpl.cpp b/src/configdialogimpl.cpp
index cbc9dcd..04e8ff6 100644
--- a/src/configdialogimpl.cpp
+++ b/src/configdialogimpl.cpp
@@ -51,7 +51,7 @@ ConfigDialogImpl::ConfigDialogImpl(TQWidget* parent, const char* name, WFlags fl
     : ConfigDialog(parent,name,fl),
         configChanged(false),
         grabbing(0),
-        curListView(0),
+        curListView(nullptr),
         mMenus(true)
 {
     new TQListBoxPixmap(listBox,MainBarIcon("kommando",TDEIcon::SizeLarge),"Menu");
@@ -108,7 +108,7 @@ void ConfigDialogImpl::slotRemoveListViewClicked()
             setChanged(true);
         lists->removeWidget(curListView);
         mMenus.remove(curListView);
-        curListView = 0;
+        curListView = nullptr;
         menuViewComboBox->removeItem(menuViewComboBox->currentItem());
         menuViewComboBox->setCurrentText("default");
         slotChangeListView("default");
@@ -242,7 +242,7 @@ void ConfigDialogImpl::slotCommandoTyped(const TQString& commando)
 void ConfigDialogImpl::slotMenuViewClicked(TQListViewItem* item)
 {
     MenuListViewItem* temp = static_cast<MenuListViewItem*>(item);
-    if(item == 0){
+    if(item == nullptr){
         iconButton->resetIcon();
         iconButton->setEnabled(false);
         commandoEdit->clear();
@@ -454,9 +454,9 @@ bool ConfigDialogImpl::event( TQEvent * evt )
 void ConfigDialogImpl::initView( )
 {
     mMenus.clear();
-    curListView = 0;
+    curListView = nullptr;
     Config::getSingleton().toListView(mMenus, lists);
-    for(KommandoView* it = mMenus.first(); it != 0; it = mMenus.next()){
+    for(KommandoView* it = mMenus.first(); it != nullptr; it = mMenus.next()){
         menuViewComboBox->insertItem(it->appName());
     }
     menuViewComboBox->setCurrentText("default");
@@ -473,8 +473,8 @@ void ConfigDialogImpl::listViewFromClick( )
     Window   win = tqt_xrootwin();
     XClassHint hint;
 
-    hint.res_class = 0;
-    hint.res_name = 0;
+    hint.res_class = nullptr;
+    hint.res_name = nullptr;
 
     //Get mouse coursor position and the application name of the window under the coursor
     XQueryPointer (dpy, win, &rep_root, &rep_child, &rep_rootx, &rep_rooty, &mousex, &mousey, &rep_mask);
diff --git a/src/configdialogimpl.h b/src/configdialogimpl.h
index bdddcb5..edf8c3e 100644
--- a/src/configdialogimpl.h
+++ b/src/configdialogimpl.h
@@ -46,7 +46,7 @@ class ConfigDialogImpl : public ConfigDialog
     TQ_OBJECT
 
     public:
-        ConfigDialogImpl(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+        ConfigDialogImpl(TQWidget* parent = nullptr, const char* name = nullptr, WFlags fl = 0);
         /*$PUBLIC_FUNCTIONS$*/
         void readConfig();
 
diff --git a/src/configuration.cpp b/src/configuration.cpp
index a2adebe..02df37c 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -141,7 +141,7 @@ void Config::fromConfigDlg(KommandoViewList& listViews )
     newNode("menuradius",root,static_cast<int>(mMenuRadius));
     newNode("scheme",root,mScheme);
 
-    for(KommandoView* it = listViews.first(); it != 0; it = listViews.next()){
+    for(KommandoView* it = listViews.first(); it != nullptr; it = listViews.next()){
         if(it->childCount() > 0){
             TQDomElement node = newMenu(root,it->appName());
             TQListViewItem* temp = it->firstChild();
@@ -172,9 +172,9 @@ void Config::toListView(KommandoViewList& listViews, TQWidgetStack* listViewPare
     if(doc){
         TQDomNode topLevelNode = doc->documentElement().firstChild();
         const TQObjectList *children = listViewParent->children();
-        if (children != 0) {
+        if (children != nullptr) {
             TQObjectListIterator it(*children);
-            for (; *it != 0; ++it)
+            for (; *it != nullptr; ++it)
                 listViewParent->removeWidget(static_cast<TQWidget*>(*it));
         }
 
@@ -203,7 +203,7 @@ void Config::toListView(KommandoViewList& listViews, TQWidgetStack* listViewPare
 void Config::toKommandoMenu(Kommando* buttonParent)
 {
     TQPtrList<Menu> topLevelMenus;
-    Menu* defaultMenu = 0;
+    Menu* defaultMenu = nullptr;
     if(doc){
         TQDomNode node = doc->documentElement().firstChild();
 
@@ -218,7 +218,7 @@ void Config::toKommandoMenu(Kommando* buttonParent)
             }
             node = node.nextSibling();
         }
-        for(Menu* it = topLevelMenus.first(); it != 0; it = topLevelMenus.next()){
+        for(Menu* it = topLevelMenus.first(); it != nullptr; it = topLevelMenus.next()){
             if(it != defaultMenu){
                 SubmenuButton* button = new SubmenuButton(buttonParent,defaultMenu,mMenuButtonSize);
                 button->hide();
diff --git a/src/kcmkommando.cpp b/src/kcmkommando.cpp
index 88f1308..e5bd52d 100644
--- a/src/kcmkommando.cpp
+++ b/src/kcmkommando.cpp
@@ -39,12 +39,12 @@ typedef KGenericFactory<KCMKommando, TQWidget> kommandoFactory;
 K_EXPORT_COMPONENT_FACTORY( kcm_kommando, kommandoFactory("kommando"))
 
 KCMKommando::KCMKommando(TQWidget *parent, const char *name, const TQStringList&)
-	: TDECModule(kommandoFactory::instance(), parent, name), about(0), configDialog(0)
+	: TDECModule(kommandoFactory::instance(), parent, name), about(nullptr), configDialog(nullptr)
 {
 	about = new TDEAboutData("kommando", I18N_NOOP("Kommando"), version, description,
-					 TDEAboutData::License_GPL, "(C) 2005 Daniel StÃ¶ckel", 0, 0, "the_docter@gmx.net");
-	about->addAuthor( "Daniel StÃ¶ckel", 0, "the_docter@gmx.net" );
-	about->addAuthor( "Sergio Cambra", 0, "runico@users.berlios.de" );
+						 TDEAboutData::License_GPL, "(C) 2005 Daniel StÃ¶ckel", nullptr, nullptr, "the_docter@gmx.net");
+	about->addAuthor( "Daniel StÃ¶ckel", nullptr, "the_docter@gmx.net" );
+	about->addAuthor( "Sergio Cambra", nullptr, "runico@users.berlios.de" );
 	setAboutData(about);
 	
 	TQVBoxLayout* layout = new TQVBoxLayout( this );
diff --git a/src/kcmkommando.h b/src/kcmkommando.h
index ce76ce2..1f3eb16 100644
--- a/src/kcmkommando.h
+++ b/src/kcmkommando.h
@@ -32,7 +32,7 @@ class KCMKommando: public TDECModule
     TQ_OBJECT
 
 public:
-    KCMKommando( TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() );
+    KCMKommando( TQWidget *parent=nullptr, const char *name=nullptr, const TQStringList& = TQStringList() );
     ~KCMKommando();
 
     virtual void load();
diff --git a/src/kommando.cpp b/src/kommando.cpp
index 6c49f09..7df0e0c 100644
--- a/src/kommando.cpp
+++ b/src/kommando.cpp
@@ -27,10 +27,10 @@
 #include "configuration.h"
 
 Kommando::Kommando()
-    :   TQWidget( 0, "Kommando", TQt::WDestructiveClose |
+    :   TQWidget( nullptr, "Kommando", TQt::WDestructiveClose |
                     TQt::WStyle_Customize  |
                     TQt::WStyle_NoBorder),
-        actMenu(0),
+        actMenu(nullptr),
         navbutton(this),
         oldNavbuttonIconType(0)
 {
@@ -61,8 +61,8 @@ void Kommando::show( )
     Window   win = tqt_xrootwin();
     XClassHint hint;
 
-    hint.res_class = 0;
-    hint.res_name = 0;
+    hint.res_class = nullptr;
+    hint.res_name = nullptr;
 
     //Get mouse coursor position and the application name of the window under the coursor
     XQueryPointer (dpy, win, &rep_root, &rep_child, &rep_rootx, &rep_rooty, &mousex, &mousey, &rep_mask);
@@ -108,12 +108,12 @@ void Kommando::toggle( )
 void Kommando::setActMenu( Menu * newMenu )
 {
     //disconnect everything
-    if(actMenu != 0){
+    if(actMenu != nullptr){
         actMenu->disconnect();
         actMenu->hideButtons();
     }
 
-    if(newMenu != 0){
+    if(newMenu != nullptr){
         if(mTopLevelMenus.containsRef(newMenu)){
             navbutton.setIcon("error");
         } else {
@@ -130,8 +130,8 @@ void Kommando::setActMenu( Menu * newMenu )
 
 void Kommando::setActTopLevelMenu(const TQString& appName )
 {
-    Menu* menu = 0;
-    for(Menu* it = mTopLevelMenus.first(); it != 0; it = mTopLevelMenus.next()){
+    Menu* menu = nullptr;
+    for(Menu* it = mTopLevelMenus.first(); it != nullptr; it = mTopLevelMenus.next()){
         if (it->appName() == appName){
             menu = it;
             break;
@@ -146,7 +146,7 @@ void Kommando::setActTopLevelMenu(const TQString& appName )
 
 void Kommando::setTopLevelMenus( const TQPtrList<Menu>& newmenus )
 {
-    setActMenu(0);
+    setActMenu(nullptr);
     //No need to clear the list, because autoDelete is turned on in
     //mTopLevelMenus
     mTopLevelMenus = newmenus;
diff --git a/src/kommandod.cpp b/src/kommandod.cpp
index 1893d31..5f2f099 100644
--- a/src/kommandod.cpp
+++ b/src/kommandod.cpp
@@ -28,7 +28,7 @@
 #include "configuration.h"
 
 KommandoDaemon::KommandoDaemon(const TQCString &name)
-    : KDEDModule(name), Shortcut(this,"Shortcut"), kommandoWin(0)
+    : KDEDModule(name), Shortcut(this,"Shortcut"), kommandoWin(nullptr)
 {
     Config& config = Config::getSingleton();
     config.readConfigFile();
diff --git a/src/kommandoview.cpp b/src/kommandoview.cpp
index 3182f12..1fb8d07 100644
--- a/src/kommandoview.cpp
+++ b/src/kommandoview.cpp
@@ -42,23 +42,23 @@ KommandoViewList::KommandoViewList(bool autoDelete)
 
 bool KommandoViewList::contains(const TQString& view )
 {
-    return getView(view) != 0;
+    return getView(view) != nullptr;
 }
 
 KommandoView * KommandoViewList::getView(const TQString& view )
 {
-    for(KommandoView* it = first(); it != 0; it = next()){
+    for(KommandoView* it = first(); it != nullptr; it = next()){
         if(it->appName() == view){
             return it;
         }
     }
-    return 0;
+    return nullptr;
 }
 
 KommandoView * KommandoViewList::getViewOrDefault( const TQString& view )
 {
-    KommandoView* temp = 0;
-    for(KommandoView* it = first(); it != 0; it = next()){
+    KommandoView* temp = nullptr;
+    for(KommandoView* it = first(); it != nullptr; it = next()){
         if(it->appName() == view){
             return it;
         }
@@ -71,7 +71,7 @@ KommandoView * KommandoViewList::getViewOrDefault( const TQString& view )
 
 void KommandoViewList::removeView( const TQString & view )
 {
-    for(KommandoView* it = first(); it != 0; it = next()){
+    for(KommandoView* it = first(); it != nullptr; it = next()){
         if(it->appName() == view){
             remove();
             return;
diff --git a/src/menu.cpp b/src/menu.cpp
index 7d9a6a7..9f138b1 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -70,7 +70,7 @@ void Menu::arrangeButtons( )
                      static_cast<int>(-cos(i*step)*dist+config.menuRadius()));
     }
 
-    for(Menu* it = children.first(); it != 0; it = children.next()){
+    for(Menu* it = children.first(); it != nullptr; it = children.next()){
         it->arrangeButtons();
     }
 }
@@ -143,7 +143,7 @@ Menu * Menu::execute( )
         selectButton(BUTTON_DESELECT);
         return temp->execute();
     }
-    return 0;    //Well, we shouldn't actually reach this place, as execute is only called if it is sure that a button was selected
+    return nullptr;    //Well, we shouldn't actually reach this place, as execute is only called if it is sure that a button was selected
 }
 
 void Menu::selectButton( TQButton * button )
diff --git a/src/roundbutton.h b/src/roundbutton.h
index 1e29a26..66e59cc 100644
--- a/src/roundbutton.h
+++ b/src/roundbutton.h
@@ -33,7 +33,7 @@ class TDE_EXPORT RoundButton : public TQButton  //well, there were round buttons
 	TQ_OBJECT
 	public:
         enum Type {Round, Commando, Submenu};
-        RoundButton( TQWidget* parent=0, unsigned short rad= 32, const char* name= 0, WFlags f = 0);
+        RoundButton( TQWidget* parent=nullptr, unsigned short rad= 32, const char* name= nullptr, WFlags f = 0);
 
         ~RoundButton();
 
@@ -42,7 +42,7 @@ class TDE_EXPORT RoundButton : public TQButton  //well, there were round buttons
         virtual void setActive(bool mode);
 
         //This method should not be called on a RoundButton instance. Childclasses have to implement it.
-        virtual Menu* execute(){ assert(0); return 0; }
+        virtual Menu* execute(){ assert(0); return nullptr; }
         virtual Type type() const { return Round; }
 
 
diff --git a/src/servicemenu.cpp b/src/servicemenu.cpp
index 021c952..2248603 100644
--- a/src/servicemenu.cpp
+++ b/src/servicemenu.cpp
@@ -133,9 +133,9 @@ TQIconSet ServiceMenu::getIconSet(const TQString& icon) const
 {
     TQIconSet iconset;
     TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(
-            icon, TDEIcon::Small, 0, TDEIcon::DefaultState, 0L, true);
+            icon, TDEIcon::Small, 0, TDEIcon::DefaultState, nullptr, true);
     TQPixmap active = TDEGlobal::instance()->iconLoader()->loadIcon(
-            icon, TDEIcon::Small, 0, TDEIcon::ActiveState, 0L, true);
+            icon, TDEIcon::Small, 0, TDEIcon::ActiveState, nullptr, true);
     
     // make sure they are not larger than 20x20
     if (normal.width() > 20 || normal.height() > 20)
@@ -185,9 +185,9 @@ void ServiceMenu::insertMenuItem(KService::Ptr & s,
 
 	TQIconSet iconset;
 	TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(
-			s->icon(), TDEIcon::Small, 0, TDEIcon::DefaultState, 0L, true);
+			s->icon(), TDEIcon::Small, 0, TDEIcon::DefaultState, nullptr, true);
 	TQPixmap active = TDEGlobal::instance()->iconLoader()->loadIcon(
-			s->icon(), TDEIcon::Small, 0, TDEIcon::ActiveState, 0L, true);
+		s->icon(), TDEIcon::Small, 0, TDEIcon::ActiveState, nullptr, true);
 
 	// make sure they are not larger than 20x20
 	if (normal.width() > 20 || normal.height() > 20)
diff --git a/src/servicemenu.h b/src/servicemenu.h
index 4d660f1..30ab525 100644
--- a/src/servicemenu.h
+++ b/src/servicemenu.h
@@ -35,9 +35,9 @@ class ServiceMenu : public TDEPopupMenu
 TQ_OBJECT
 public:
     ServiceMenu(TQObject *receiver, const char *slotActivatedItem,
-                const char *slotActivatedGroup, TQWidget *parent = 0, const char *name = 0);
+                const char *slotActivatedGroup, TQWidget *parent = nullptr, const char *name = nullptr);
     ServiceMenu(const TQString & relPath, TQObject *receiver, const char *slotActivatedItem,
-                const char *slotActivatedGroup, TQWidget *parent = 0, const char *name = 0);
+                const char *slotActivatedGroup, TQWidget *parent = nullptr, const char *name = nullptr);
 
     ~ServiceMenu();
 
@@ -59,7 +59,7 @@ private:
     const char *m_slotActivatedGroup;
 	
 	void initialize();
-	void insertMenuItem(KService::Ptr &s, const TQStringList *suppressGenericNames = 0);
+	void insertMenuItem(KService::Ptr &s, const TQStringList *suppressGenericNames = nullptr);
 };
 
 #endif
-- 
cgit v1.2.3

