From 42efe0d73d0039969173fdef82aa5218295c56e2 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Fri, 13 Nov 2026 07:26:38 -0300
Subject: Replace NULL pointer constants with nullptr in KPovModeler
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>
---
 kpovmodeler/pmglview.cpp              | 10 +++++-----
 kpovmodeler/pmlayoutsettings.cpp      |  4 ++--
 kpovmodeler/pmlibrarybrowser.cpp      |  2 +-
 kpovmodeler/pmlibrarybrowser.h        |  2 +-
 kpovmodeler/pmlibraryentrypreview.cpp |  4 ++--
 kpovmodeler/pmlibraryhandleedit.h     |  2 +-
 kpovmodeler/pmlibraryiconview.cpp     |  4 ++--
 kpovmodeler/pmlibraryiconview.h       |  2 +-
 kpovmodeler/pmlibrarymanager.cpp      |  4 ++--
 kpovmodeler/pmlibraryobject.cpp       | 16 ++++++++--------
 kpovmodeler/pmpart.cpp                |  2 +-
 11 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/kpovmodeler/pmglview.cpp b/kpovmodeler/pmglview.cpp
index 6c0c8b12..c3ae3c5a 100644
--- a/kpovmodeler/pmglview.cpp
+++ b/kpovmodeler/pmglview.cpp
@@ -78,7 +78,7 @@ public:
    PMGLViewStatic( )
    {
       m_colormap = 0;
-      m_context = NULL;
+      m_context = nullptr;
       m_colormapAllocated = false;
       m_display = 0;
       m_visualInfo = 0;
@@ -87,7 +87,7 @@ public:
    {
       if( m_colormapAllocated )
          XFreeColormap( m_display, m_colormap );
-      if( m_context != NULL )
+      if( m_context )
          glXDestroyContext( m_display, m_context );
       if( m_visualInfo )
          XFree( m_visualInfo );
@@ -293,14 +293,14 @@ void PMGLView::initializeGL( )
             // this context is shared between all gl views!
             s_pSharedData->m_context = glXCreateContext( display, vi, 0, s_bDirect );
 
-            if( s_pSharedData->m_context != NULL )
+            if( s_pSharedData->m_context )
                kdDebug( PMArea ) << "PMGLView: glx context created\n";
 
          }
       }
    }
 
-   if( s_pSharedData->m_context != NULL )
+   if( s_pSharedData->m_context )
    {
       XVisualInfo* vi = s_pSharedData->m_visualInfo;
 
@@ -384,7 +384,7 @@ PMGLView::~PMGLView( )
 
 bool PMGLView::isValid( ) const
 {
-   if( s_pSharedData && ( s_pSharedData->m_context != NULL ) )
+   if( s_pSharedData && s_pSharedData->m_context )
       return true;
    return false;
 }
diff --git a/kpovmodeler/pmlayoutsettings.cpp b/kpovmodeler/pmlayoutsettings.cpp
index d9ce8068..0f7d4e17 100644
--- a/kpovmodeler/pmlayoutsettings.cpp
+++ b/kpovmodeler/pmlayoutsettings.cpp
@@ -313,7 +313,7 @@ void PMLayoutSettings::slotLayoutSelected( int index )
   m_pViewLayoutName->blockSignals( sb );
   
   PMViewLayout::iterator it;
-  TQListViewItem* previous = NULL;
+  TQListViewItem* previous = nullptr;
   m_pViewEntries->clear( );
   i = 0;
   for( it = ( *m_currentViewLayout ).begin( );
@@ -661,7 +661,7 @@ void PMLayoutSettings::slotAddViewEntryClicked( )
       // If there is no selected the list must be empty
       ( *m_currentViewLayout ).addEntry( p );
       str.setNum( 1 );
-      TQListViewItem* a = new TQListViewItem( m_pViewEntries, NULL,
+      TQListViewItem* a = new TQListViewItem( m_pViewEntries, nullptr,
                                             str, p.viewTypeAsString( ),
                                             p.dockPositionAsString( ) );
       m_pViewEntries->setSelected( a, true );
diff --git a/kpovmodeler/pmlibrarybrowser.cpp b/kpovmodeler/pmlibrarybrowser.cpp
index 15627940..45404ec6 100644
--- a/kpovmodeler/pmlibrarybrowser.cpp
+++ b/kpovmodeler/pmlibrarybrowser.cpp
@@ -151,7 +151,7 @@ void PMLibraryBrowserViewWidget::slotIconViewSetLibrary( )
 {
    m_pLibraryIconView->setLibrary( m_pFutureLibrary );
    m_pCurrentLibrary = m_pFutureLibrary;
-   m_pFutureLibrary = NULL;
+   m_pFutureLibrary = nullptr;
 }
 
 void PMLibraryBrowserViewWidget::slotSelectionChanged( TQIconViewItem* item )
diff --git a/kpovmodeler/pmlibrarybrowser.h b/kpovmodeler/pmlibrarybrowser.h
index b1fbc91d..5f1df106 100644
--- a/kpovmodeler/pmlibrarybrowser.h
+++ b/kpovmodeler/pmlibrarybrowser.h
@@ -68,7 +68,7 @@ class PMLibraryBrowserViewWidget: public TQWidget
    TQ_OBJECT
   
 public:
-   PMLibraryBrowserViewWidget( TQWidget *parent, const char* name = NULL );
+   PMLibraryBrowserViewWidget( TQWidget *parent, const char* name = nullptr );
 
 private slots:
    void resizeEvent( TQResizeEvent* ev );
diff --git a/kpovmodeler/pmlibraryentrypreview.cpp b/kpovmodeler/pmlibraryentrypreview.cpp
index 162fc789..8f497b83 100644
--- a/kpovmodeler/pmlibraryentrypreview.cpp
+++ b/kpovmodeler/pmlibraryentrypreview.cpp
@@ -43,7 +43,7 @@ PMLibraryEntryPreview::PMLibraryEntryPreview( TQWidget* parent ) :
    TQWidget( parent )
 {
    setAcceptDrops( true );
-   m_pPart = new PMPart( this, "treeview", NULL, "part", false, true );
+   m_pPart = new PMPart( this, "treeview", nullptr, "part", false, true );
    m_pPart->setReadWrite( false );
    m_readOnly = true;
    m_modified = false;
@@ -243,7 +243,7 @@ void PMLibraryEntryPreview::slotTextChanged( const TQString& /* s */)
 
 void PMLibraryEntryPreview::slotPreviewClicked( )
 {
-   KFileDialog dlg( TQString(), "", NULL, "", false );
+   KFileDialog dlg( TQString(), "", nullptr, "", false );
 
    dlg.setFilter( "image/jpeg image/gif image/tiff image/png image/x-bmp" );
    if( dlg.exec( ) == TQDialog::Accepted )
diff --git a/kpovmodeler/pmlibraryhandleedit.h b/kpovmodeler/pmlibraryhandleedit.h
index aa3ed470..ad09d40e 100644
--- a/kpovmodeler/pmlibraryhandleedit.h
+++ b/kpovmodeler/pmlibraryhandleedit.h
@@ -42,7 +42,7 @@ public:
     * Construct a dialog to edit the properties of lib. The library will be
     * modified only if Ok is pressed.
     */
-   PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget *parent = NULL, const char* name = NULL );
+   PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget *parent = nullptr, const char* name = nullptr );
 
    static void saveConfig( TDEConfig* cfg );
    static void restoreConfig( TDEConfig* cfg );
diff --git a/kpovmodeler/pmlibraryiconview.cpp b/kpovmodeler/pmlibraryiconview.cpp
index 4f60e4d1..f77b72b2 100644
--- a/kpovmodeler/pmlibraryiconview.cpp
+++ b/kpovmodeler/pmlibraryiconview.cpp
@@ -106,8 +106,8 @@ void PMLibraryIconDrag::append( const TQIconDragItem &item, const TQRect &pr,
 PMLibraryIconView::PMLibraryIconView( TQWidget* parent, const char* name )
       : TDEIconView( parent, name )
 {
-   m_pLibrary = NULL;
-   m_pCurrentLibrary = NULL;
+   m_pLibrary = nullptr;
+   m_pCurrentLibrary = nullptr;
    setSelectionMode( Single );
    setMode( Execute );
 }
diff --git a/kpovmodeler/pmlibraryiconview.h b/kpovmodeler/pmlibraryiconview.h
index 6077c9e4..afe67f72 100644
--- a/kpovmodeler/pmlibraryiconview.h
+++ b/kpovmodeler/pmlibraryiconview.h
@@ -64,7 +64,7 @@ class PMLibraryIconView: public TDEIconView
    TQ_OBJECT
   
 public:
-   PMLibraryIconView( TQWidget *parent, const char* name = NULL );
+   PMLibraryIconView( TQWidget *parent, const char* name = nullptr );
 
    /**
     * Set the library base path
diff --git a/kpovmodeler/pmlibrarymanager.cpp b/kpovmodeler/pmlibrarymanager.cpp
index d8b3c9b2..d80eab28 100644
--- a/kpovmodeler/pmlibrarymanager.cpp
+++ b/kpovmodeler/pmlibrarymanager.cpp
@@ -37,7 +37,7 @@ PMLibraryHandle* PMLibraryManager::getLibraryHandle( const TQString& libraryName
       if( it.current( )->name( ) == libraryName )
          return it.current( );
 
-   return NULL;
+   return nullptr;
 }
 
 PMLibraryManager::PMLibraryManager( )
@@ -92,7 +92,7 @@ void PMLibraryManager::scanLibraries( )
 
       // For each sub directory
       TQFileInfo* fi;
-      for( ; ( fi = it.current( ) ) != NULL; ++it ) 
+      for( ; ( fi = it.current( ) ) != nullptr; ++it )
       {
          // check for the existance of library_index.xml
          // If it's there it's a library
diff --git a/kpovmodeler/pmlibraryobject.cpp b/kpovmodeler/pmlibraryobject.cpp
index a1c1ff27..17bf4f9b 100644
--- a/kpovmodeler/pmlibraryobject.cpp
+++ b/kpovmodeler/pmlibraryobject.cpp
@@ -36,9 +36,9 @@ PMLibraryObject::PMLibraryObject( )
 {
    m_previewLoaded = false;
    m_objectsLoaded = false;
-   m_preview = NULL;
-   m_objects = NULL;
-   m_data = NULL;
+   m_preview = nullptr;
+   m_objects = nullptr;
+   m_data = nullptr;
    m_name = TQString();
    m_description = TQString();
    m_keywords = TQString();
@@ -48,8 +48,8 @@ PMLibraryObject::PMLibraryObject( KURL u )
 {
    m_previewLoaded = false;
    m_objectsLoaded = false;
-   m_preview = NULL;
-   m_objects = NULL;
+   m_preview = nullptr;
+   m_objects = nullptr;
    m_data = new KTar( u.path( ), "application/x-gzip" );
    loadLibraryInfo( );
 }
@@ -134,7 +134,7 @@ TQImage* PMLibraryObject::preview( )
          // Position in the root of the file
          const KArchiveDirectory* root = m_data->directory( );
          if( !root )
-            return NULL;
+            return nullptr;
 
          // Find the object preview
          const KArchiveEntry* entry = root->entry( "preview.png" );
@@ -162,7 +162,7 @@ TQByteArray* PMLibraryObject::objects( )
          // Position in the root of the file
          const KArchiveDirectory* root = m_data->directory( );
          if( !root )
-            return NULL;
+            return nullptr;
 
          // Find the object info
          const KArchiveEntry* entry = root->entry( "objectdata.kpm" );
@@ -190,7 +190,7 @@ TQByteArray* PMLibraryObject::objects( )
             else
             {
                delete m_objects;
-               m_objects = NULL;
+               m_objects = nullptr;
             }
          }
       }
diff --git a/kpovmodeler/pmpart.cpp b/kpovmodeler/pmpart.cpp
index 0bc01f89..c21be349 100644
--- a/kpovmodeler/pmpart.cpp
+++ b/kpovmodeler/pmpart.cpp
@@ -2500,7 +2500,7 @@ void PMPart::slotNewMesh( )
 
 void PMPart::slotSearchLibraryObject( )
 {
-   PMLibraryObjectSearch* aux = new PMLibraryObjectSearch( NULL );
+   PMLibraryObjectSearch* aux = new PMLibraryObjectSearch( nullptr );
    aux->show( );
 }
 
-- 
cgit v1.2.3

