From 72196cc424892ef391e8aba06addf1bdc1f4a133 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 20 Sep 2026 17:41:13 -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>
---
 kbarcode/barcodecombo.cpp     | 12 ++++++------
 kbarcode/barkode.cpp          | 24 ++++++++++++------------
 kbarcode/barkodeengine.cpp    |  6 +++---
 kbarcode/batchprinter.cpp     | 36 ++++++++++++++++++------------------
 kbarcode/batchprinter.h       |  2 +-
 kbarcode/batchwizard.cpp      |  8 ++++----
 kbarcode/batchwizard.h        |  2 +-
 kbarcode/commands.cpp         | 14 +++++++-------
 kbarcode/definition.cpp       |  6 +++---
 kbarcode/documentitem.cpp     |  6 +++---
 kbarcode/gnubarcode.cpp       | 10 +++++-----
 kbarcode/kbarcode.cpp         | 12 ++++++------
 kbarcode/label.cpp            |  4 ++--
 kbarcode/labeleditor.cpp      | 18 +++++++++---------
 kbarcode/mimesources.cpp      |  2 +-
 kbarcode/mimesources.h        |  2 +-
 kbarcode/multilineeditdlg.cpp |  2 +-
 kbarcode/mycanvasview.cpp     |  2 +-
 kbarcode/pixmapbarcode.cpp    |  4 ++--
 kbarcode/propertywidget.cpp   |  2 +-
 kbarcode/purepostscript.cpp   |  2 +-
 kbarcode/sqltables.cpp        |  6 +++---
 kbarcode/tbarcode2.cpp        |  4 ++--
 kbarcode/tcanvasitem.cpp      |  4 ++--
 kbarcode/tec.cpp              |  2 +-
 kbarcode/tokenprovider.cpp    | 10 +++++-----
 kbarcode/xmlutils.cpp         |  4 ++--
 27 files changed, 103 insertions(+), 103 deletions(-)

diff --git a/kbarcode/barcodecombo.cpp b/kbarcode/barcodecombo.cpp
index 78cebcc..fb61466 100644
--- a/kbarcode/barcodecombo.cpp
+++ b/kbarcode/barcodecombo.cpp
@@ -41,8 +41,8 @@
 BarcodeValidator::BarcodeValidator( TQObject* parent, const char* name )
     : TQValidator( parent, name )
 {
-    m_valid    = NULL;
-    m_notValid = NULL;
+    m_valid    = nullptr;
+    m_notValid = nullptr;
 }
 
 bool BarcodeValidator::pcreValidate( TQString* pattern, const TQString & input ) const
@@ -59,12 +59,12 @@ bool BarcodeValidator::pcreValidate( TQString* pattern, const TQString & input )
         return true;
 
     compiled = pcre2_compile( (PCRE2_SPTR)pattern->latin1(), PCRE2_ZERO_TERMINATED, 0,
-            &errcode, &erroffset, NULL );
+            &errcode, &erroffset, nullptr );
     if( !compiled ) // ignore all errors
         return true; 
 
     pcre2_match_data *match_data;
-    result = pcre2_match( compiled, (PCRE2_SPTR)input.latin1(), input.length(), 0, 0, match_data, NULL);
+    result = pcre2_match( compiled, (PCRE2_SPTR)input.latin1(), input.length(), 0, 0, match_data, nullptr);
     pcre2_match_data_free(match_data);
     pcre2_code_free(compiled);
 
@@ -117,7 +117,7 @@ void BarcodeCombo::setEncodingType( const TQString & type )
 BarcodeWidget::BarcodeWidget(TQWidget *parent, const char *name )
     : TQWidget( parent, name ), m_validator( this )
 {
-    m_token = NULL;
+    m_token = nullptr;
 
     TQGridLayout* grid = new TQGridLayout( this, 6, 6 );
 
@@ -286,7 +286,7 @@ void BarcodeWidget::encodingChanged()
         data->setValidator( &m_validator );
     }
     else 
-        data->setValidator( NULL );
+        data->setValidator( nullptr );
 
     slotValidateValue();
 }
diff --git a/kbarcode/barkode.cpp b/kbarcode/barkode.cpp
index a0f5ccc..bf99a0f 100644
--- a/kbarcode/barkode.cpp
+++ b/kbarcode/barkode.cpp
@@ -71,7 +71,7 @@ enum {
 #include <tdestandarddirs.h>
 
 TQValueList<tBarcodeInfo> Barkode::s_info;
-TQStringList* Barkode::s_encoding   = NULL;
+TQStringList* Barkode::s_encoding   = nullptr;
 bool Barkode::s_haveGnuBarcode     = false;
 bool Barkode::s_havePdfEncode      = false;
 bool Barkode::s_haveTBarcode       = false;
@@ -81,17 +81,18 @@ bool Barkode::s_havePurePostscript = false;
 Barkode::Barkode()
 {
     initInfo();
-    m_engine = NULL;
-    m_token = NULL;
+    m_engine = nullptr;
+    m_token = nullptr;
     
     defaults();
 }
 
+
 Barkode::Barkode( const Barkode & barkode )
 {
     initInfo();
-    m_engine = NULL;
-    m_token = NULL;
+    m_engine = nullptr;
+    m_token = nullptr;
     
     *this = barkode;
 }
@@ -137,7 +138,7 @@ void Barkode::defaults()
 
     updateEngine();
 
-    BarkodeEngineOptions* options = m_engine ? m_engine->options() : NULL;
+    BarkodeEngineOptions* options = m_engine ? m_engine->options() : nullptr;
     if( options )
         options->defaults();
 }
@@ -324,7 +325,7 @@ void Barkode::updateEngine()
     {
         // switch to another engine
         delete m_engine;
-        m_engine = NULL;
+        m_engine = nullptr;
     }
 
     if( !m_engine )
@@ -607,7 +608,7 @@ const char* Barkode::typeFromName( const TQString & name )
         if( s_info[i].name == name )
             return s_info[i].xml.latin1();
 
-    return NULL;
+    return nullptr;
 }
 
 const char* Barkode::nameFromType( const TQString & type )
@@ -616,7 +617,7 @@ const char* Barkode::nameFromType( const TQString & type )
         if( s_info[i].xml == type )
             return s_info[i].name.latin1();
 
-    return NULL;
+    return nullptr;
 }
 
 TQString* Barkode::validatorFromType( const TQString & type )
@@ -625,7 +626,7 @@ TQString* Barkode::validatorFromType( const TQString & type )
         if( s_info[i].xml == type )
             return &(s_info[i].validator);
 
-    return NULL;
+    return nullptr;
 }
 
 TQString* Barkode::validatorNotFromType( const TQString & type )
@@ -634,7 +635,7 @@ TQString* Barkode::validatorNotFromType( const TQString & type )
         if( s_info[i].xml == type )
             return &(s_info[i].validatorNot);
 
-    return NULL;
+    return nullptr;
 }
 
 tBarcodeInfo Barkode::createInfo( const char* xml, const TQString & name, const EEngine engine, 
@@ -965,4 +966,3 @@ void Barkode::initValidators()
 
     xml.close();
 }
-
diff --git a/kbarcode/barkodeengine.cpp b/kbarcode/barkodeengine.cpp
index 986cdc3..afa89c8 100644
--- a/kbarcode/barkodeengine.cpp
+++ b/kbarcode/barkodeengine.cpp
@@ -21,16 +21,17 @@
 BarkodeEngine::BarkodeEngine()
 {
     m_valid = false;
-    barkode = NULL;
+    barkode = nullptr;
 }
 
+
 BarkodeEngine::~BarkodeEngine()
 {
 }
 
 BarkodeEngineOptions* BarkodeEngine::options()
 {
-    return NULL;
+    return nullptr;
 }
 
 EmptyEngine::EmptyEngine()
@@ -52,4 +53,3 @@ void EmptyEngine::drawBarcode(  TQPainter & painter, int x, int y )
 {
     barkode->drawInvalid( painter, x, y );
 }
-
diff --git a/kbarcode/batchprinter.cpp b/kbarcode/batchprinter.cpp
index 50998a8..a4a4079 100644
--- a/kbarcode/batchprinter.cpp
+++ b/kbarcode/batchprinter.cpp
@@ -50,21 +50,22 @@ BatchPrinter::BatchPrinter( KPrinter* p, TQWidget* _parent )
     : printer( p ), parent( _parent )
 {
     m_events = true;
-    m_data = NULL;
-    m_vardata = NULL;
-    m_addrdata = NULL;
+    m_data = nullptr;
+    m_vardata = nullptr;
+    m_addrdata = nullptr;
 
     m_cur_data_count = 0;
 
     m_paintDevice = p;
 }
 
+
 BatchPrinter::BatchPrinter( const TQString & path, TQWidget* p )
     : m_path( path ), parent( p )
 {
-    m_data            = NULL;
-    m_vardata         = NULL;
-    m_addrdata        = NULL;
+    m_data            = nullptr;
+    m_vardata         = nullptr;
+    m_addrdata        = nullptr;
     m_move            = 0;
     m_image_filename  = E_BARCODE;
 
@@ -76,9 +77,9 @@ BatchPrinter::BatchPrinter( const TQString & path, TQWidget* p )
 BatchPrinter::BatchPrinter( const TQString & path, int format, TQWidget* _parent )
     : m_path( path ), m_bcp_format( format ), parent( _parent )
 {
-    m_data            = NULL;
-    m_vardata         = NULL;
-    m_addrdata        = NULL;
+    m_data            = nullptr;
+    m_vardata         = nullptr;
+    m_addrdata        = nullptr;
     m_move            = 0;
     m_image_filename  = E_BARCODE;
 
@@ -197,7 +198,7 @@ void BatchPrinter::startPrintData( TQProgressDialog* progress )
 void BatchPrinter::startPrintVarData( TQProgressDialog* progress )
 {
     Label* l;
-    while( ( l = initLabel() ) != NULL )
+    while( ( l = initLabel() ) != nullptr )
     {
         if( !curw )
             curw = m_measure.gapLeft( printer );
@@ -233,12 +234,12 @@ void BatchPrinter::startPrintVarData( TQProgressDialog* progress )
 
 Label* BatchPrinter::initLabel( int* number )
 {
-    Label* l = NULL;
+    Label* l = nullptr;
 
     if( (m_vardata && m_cur_data_count >= m_vardata->count() ) ||
         (m_data && m_cur_data_count >= m_data->count() ) ||
         (m_addrdata && m_cur_data_count >= m_addrdata->count() ) )
-        return NULL;
+        return nullptr;
 
     if( number )
 	*number = 1;
@@ -276,10 +277,10 @@ void BatchPrinter::startImages()
     m_cur_data_count = 0;
 
     Measurements measure = def->getMeasurements();
-    Label* l = NULL;
+    Label* l = nullptr;
     painter = new TQPainter();
     TQPixmap pixmap( (int)measure.width( parent ), (int)measure.height( parent ) );
-    while( (l = initLabel( &number ) ) != NULL )
+    while( (l = initLabel( &number ) ) != nullptr )
     {
         for( int i = 0; i < number; i++ ) 
 	{
@@ -357,7 +358,7 @@ void BatchPrinter::startBCP()
     
     TQTextStream stream( &file );
     Label* l;
-    while( ( l = initLabel( &number ) ) != NULL )
+    while( ( l = initLabel( &number ) ) != nullptr )
     {
         for( int i = 0; i < number; i++ ) 
         {
@@ -391,7 +392,7 @@ void BatchPrinter::startBCP()
 		delete l;
                 delete progress;
                 delete m_paintDevice;
-		m_paintDevice = NULL;
+		m_paintDevice = nullptr;
 
                 file.close();
 
@@ -403,7 +404,7 @@ void BatchPrinter::startBCP()
     
     delete progress;
     delete m_paintDevice;
-    m_paintDevice = NULL;
+    m_paintDevice = nullptr;
 
     file.close();
 }
@@ -539,4 +540,3 @@ void BatchPrinter::setData( TDEABC::AddresseeList* list )
 	delete m_addrdata;
     m_addrdata = list;
 }
-
diff --git a/kbarcode/batchprinter.h b/kbarcode/batchprinter.h
index 0eb5f02..758bf4b 100644
--- a/kbarcode/batchprinter.h
+++ b/kbarcode/batchprinter.h
@@ -120,7 +120,7 @@ class BatchPrinter
 	/** create a label which gets intialized either with m_vardata or m_data
 	 *  @p number is set to the number of times this label should be printed.
 	 */
-	Label* initLabel( int* number = NULL );
+	Label* initLabel( int* number = nullptr );
 
         /** starts a new page on the printer, if the
           * current label does not fit anymore on the current pageh
diff --git a/kbarcode/batchwizard.cpp b/kbarcode/batchwizard.cpp
index 6fa944d..517b887 100644
--- a/kbarcode/batchwizard.cpp
+++ b/kbarcode/batchwizard.cpp
@@ -551,8 +551,8 @@ void BatchWizard::accept()
 
 void BatchWizard::printNow( const TQString & printer, bool bUserInteraction )
 {
-    BatchPrinter* batch = NULL;
-    KPrinter* prn = NULL;
+    BatchPrinter* batch = nullptr;
+    KPrinter* prn = nullptr;
     int batchType = 0;
 
     // let's check if the label file does even exist!
@@ -624,7 +624,7 @@ void BatchWizard::printNow( const TQString & printer, bool bUserInteraction )
 
 void BatchWizard::setupBatchPrinter( BatchPrinter* batch, int m )
 {
-    Definition* def = NULL;
+    Definition* def = nullptr;
     TQString description;
     bool kbarcode18;
 
@@ -1001,7 +1001,7 @@ void BatchWizard::fillVarList()
     DocumentItemList list;
 
     TokenProvider token( this );
-    Definition* def = NULL;
+    Definition* def = nullptr;
 
     TQString description;
     bool kbarcode18;
diff --git a/kbarcode/batchwizard.h b/kbarcode/batchwizard.h
index e356e30..6c5ec77 100644
--- a/kbarcode/batchwizard.h
+++ b/kbarcode/batchwizard.h
@@ -45,7 +45,7 @@ class BatchWizard : public KWizard, public BatchIface {
     TQ_OBJECT
   
     public:
-        BatchWizard( TQWidget* parent = NULL, const char* name = NULL );
+        BatchWizard( TQWidget* parent = nullptr, const char* name = nullptr );
         ~BatchWizard();
 
     	/** reimplemented DCOP method from BatchIface 
diff --git a/kbarcode/commands.cpp b/kbarcode/commands.cpp
index cf9c761..d3b35fb 100644
--- a/kbarcode/commands.cpp
+++ b/kbarcode/commands.cpp
@@ -88,8 +88,8 @@ void CommandUtils::documentItemDeleted()
       * was deleted to (as it usually deltes the document item)
       */
     /* NOT NEEDED
-    m_canvas_item = NULL;
-    c = NULL;
+    m_canvas_item = nullptr;
+    c = nullptr;
     
     tqDebug("Document item removed from list!");
     delete this;
@@ -102,8 +102,8 @@ NewItemCommand::NewItemCommand( MyCanvasView* view, const TQString & name )
     cv = view;
     m_name = name;
     m_point = getFreePos( cv->canvas() );
-    m_item = NULL;
-    m_object = NULL;
+    m_item = nullptr;
+    m_object = nullptr;
 }
 
 NewItemCommand::~NewItemCommand()
@@ -142,7 +142,7 @@ void NewItemCommand::execute()
 void NewItemCommand::unexecute()
 {
     if( m_item ) {
-        m_item->setCanvas( NULL );
+        m_item->setCanvas( nullptr );
         m_item->hide();
     }
 }
@@ -154,8 +154,8 @@ void NewItemCommand::documentItemDeleted()
       */
 
     /* NOT NEEDED:
-    m_item = NULL;
-    m_object = NULL;
+    m_item = nullptr;
+    m_object = nullptr;
     
     tqDebug("NewItemCommand: Document item removed from list!");
     delete this;
diff --git a/kbarcode/definition.cpp b/kbarcode/definition.cpp
index f581cc2..1122d57 100644
--- a/kbarcode/definition.cpp
+++ b/kbarcode/definition.cpp
@@ -40,11 +40,11 @@ bool filecopy( const char* src, const char* dest )
     int c;
 
     d = fopen(dest, "w");
-    if( d == NULL )
+    if( d == nullptr )
         return false;
 
     s = fopen(src, "r");
-    if( s == NULL ) {
+    if( s == nullptr ) {
         fclose( d );
         remove( dest );
         return false;
@@ -213,7 +213,7 @@ void Definition::destroyProgress()
 /*
     if( m_progress )
 	delete m_progress;
-    m_progress = NULL;
+        m_progress = nullptr;
 */
 }
 
diff --git a/kbarcode/documentitem.cpp b/kbarcode/documentitem.cpp
index ba0f034..545f8d2 100644
--- a/kbarcode/documentitem.cpp
+++ b/kbarcode/documentitem.cpp
@@ -33,10 +33,11 @@ DocumentItem::DocumentItem()
     init();
 }
 
+
 void DocumentItem::init()
 {
-    m_canvasitem = NULL;
-    m_token = NULL;
+    m_canvasitem = nullptr;
+    m_token = nullptr;
     m_device = TDEApplication::desktop();
     
     m_z = 0;    
@@ -242,4 +243,3 @@ const bool DocumentItem::locked() const
 {
     return m_locked;
 }
-
diff --git a/kbarcode/gnubarcode.cpp b/kbarcode/gnubarcode.cpp
index 5767493..b38731c 100644
--- a/kbarcode/gnubarcode.cpp
+++ b/kbarcode/gnubarcode.cpp
@@ -37,7 +37,7 @@
 GnuBarcode::GnuBarcode()
     : BarkodeEngine()
 {
-    m_item = NULL;
+    m_item = nullptr;
     m_size = TQSize( 0, 0 );
     
     m_scalex = 1.0;
@@ -61,7 +61,7 @@ void GnuBarcode::update( const TQPaintDevice* device )
     {
         tqDebug("Deleting");
         Barcode_Delete( m_item );
-        m_item = NULL;
+        m_item = nullptr;
     }
 
     if( val.isEmpty() )
@@ -75,7 +75,7 @@ void GnuBarcode::update( const TQPaintDevice* device )
     if( !m_item )
     {
         Barcode_Delete( m_item );
-        m_item = NULL;
+        m_item = nullptr;
         delete [] value;
         return;
     }
@@ -83,7 +83,7 @@ void GnuBarcode::update( const TQPaintDevice* device )
     if( Barcode_Encode( m_item, Barkode::internalType( barkode->type() ) ) == -1 )
     {
         Barcode_Delete( m_item );
-        m_item = NULL;
+        m_item = nullptr;
         
         delete [] value;
         return;
@@ -185,7 +185,7 @@ const BarkodeEngine &GnuBarcode::operator=( const BarkodeEngine & rhs )
         {
             tqDebug("GnuBarcode::operator=() : deleting internal barcode item");
             Barcode_Delete( m_item );
-            m_item = NULL;
+            m_item = nullptr;
         }
     }
 
diff --git a/kbarcode/kbarcode.cpp b/kbarcode/kbarcode.cpp
index 70317fa..1f6d1a0 100644
--- a/kbarcode/kbarcode.cpp
+++ b/kbarcode/kbarcode.cpp
@@ -116,7 +116,7 @@ void KBarcode::startBarcode()
 
 void KBarcode::startLabelEditor()
 {
-    LabelEditor* ed = new LabelEditor( NULL, TQString(), "LabelEditorWindow" );
+    LabelEditor* ed = new LabelEditor( nullptr, TQString(), "LabelEditorWindow" );
     ed->startupDlg( LabelEditor::eCreateNewLabel, TQString() );
 }
 
@@ -127,22 +127,22 @@ void KBarcode::startBatchPrint()
 
 void KBarcode::editArticles()
 {
-    new DatabaseBrowser( TABLE_BASIC, NULL, "basicbrowser" );
+    new DatabaseBrowser( TABLE_BASIC, nullptr, "basicbrowser" );
 }
 
 void KBarcode::editCustomers()
 {
-    new DatabaseBrowser( TABLE_CUSTOMER, NULL, "customerbrowser" );
+    new DatabaseBrowser( TABLE_CUSTOMER, nullptr, "customerbrowser" );
 }
 
 void KBarcode::editCustomerText()
 {
-    new DatabaseBrowser( TABLE_CUSTOMER_TEXT, NULL, "customertextbrowser" );
+    new DatabaseBrowser( TABLE_CUSTOMER_TEXT, nullptr, "customertextbrowser" );
 }
 
 void KBarcode::editLabelDef()
 {
-    new DatabaseBrowser( TABLE_LABEL_DEF, NULL, "defbrowser" );
+    new DatabaseBrowser( TABLE_LABEL_DEF, nullptr, "defbrowser" );
 }
 
 void KBarcode::enableData()
@@ -157,7 +157,7 @@ bool KBarcode::parseCmdLine()
     TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
 
     BatchPrinter::EOutputFormat eFormat = BatchPrinter::POSTSCRIPT;
-    LabelEditor* pEdit = NULL;
+    LabelEditor* pEdit = nullptr;
     TQString serial;
     TQString sqlquery   = TQString();
     TQString csvfile    = TQString();
diff --git a/kbarcode/label.cpp b/kbarcode/label.cpp
index 552a969..456aad4 100644
--- a/kbarcode/label.cpp
+++ b/kbarcode/label.cpp
@@ -235,11 +235,11 @@ void Label::load( TQIODevice* device )
     
     bool kbarcode18;
     TQString description;
-    Definition* definition = NULL;
+    Definition* definition = nullptr;
     readXMLHeader( &doc, description, kbarcode18, &definition );
     delete definition;
     
-    readDocumentItems( &m_list, &doc, NULL, kbarcode18 );
+    readDocumentItems( &m_list, &doc, nullptr, kbarcode18 );
                 
     // sort the list by z index
     std::sort(m_list.begin(), m_list.end(), [](DocumentItem *a, DocumentItem *b) { return *a < *b; });
diff --git a/kbarcode/labeleditor.cpp b/kbarcode/labeleditor.cpp
index 76e3f72..85db747 100644
--- a/kbarcode/labeleditor.cpp
+++ b/kbarcode/labeleditor.cpp
@@ -126,8 +126,8 @@ LabelEditor::LabelEditor( TQWidget *parent, TQString _filename, const char *name
       DSMainWindow( parent, name, f )
 {
     undoAct = 
-	redoAct = NULL; 
-    history = NULL;
+	redoAct = nullptr;
+    history = nullptr;
 
     description = TQString();
     d = new Definition();
@@ -284,7 +284,7 @@ bool LabelEditor::save()
 
 bool LabelEditor::saveas()
 {
-    TQString name = KFileDialog::getSaveFileName ( NULL, "*.kbarcode", this );
+    TQString name = KFileDialog::getSaveFileName ( nullptr, "*.kbarcode", this );
     if(name.isEmpty())
         return false;
 
@@ -345,7 +345,7 @@ void LabelEditor::save( TQIODevice* device )
 
 bool LabelEditor::open()
 {
-    TQString name = KFileDialog::getOpenFileName ( NULL, "*.kbarcode", this,  i18n("Select Label") );
+    TQString name = KFileDialog::getOpenFileName ( nullptr, "*.kbarcode", this,  i18n("Select Label") );
     if(name.isEmpty()) return false;
 
     return openUrl( name );
@@ -376,7 +376,7 @@ bool LabelEditor::openUrl( const TQString & url )
 
     bool kbarcode18 = false;
     delete d;
-    d = NULL;
+    d = nullptr;
 
     readXMLHeader( &doc, description, kbarcode18, &d );
 
@@ -735,8 +735,8 @@ void LabelEditor::lockItem()
     TCanvasItemList list = cv->getSelected();
     KMacroCommand* mc = new KMacroCommand( i18n("Protected Item") );
     
-    DocumentItem* item = NULL;
-    LockCommand* lc = NULL;
+    DocumentItem* item = nullptr;
+    LockCommand* lc = nullptr;
     for( unsigned int i=0;i<list.count();i++)
     {
         item = list[i]->item();
@@ -988,7 +988,7 @@ void LabelEditor::paste()
 void LabelEditor::startEditor()
 {
     if( isChanged() ) {
-        LabelEditor* lb = new LabelEditor( NULL, TQString(), "LabelEditorWindow" );
+        LabelEditor* lb = new LabelEditor( nullptr, TQString(), "LabelEditorWindow" );
         lb->startupDlg( eCreateNewLabel, TQString() );
     } else
         newLabel();
@@ -1024,7 +1024,7 @@ void LabelEditor::startLoadEditor()
 
 void LabelEditor::batchPrint()
 {
-    new BatchWizard( NULL );
+    new BatchWizard( nullptr );
 }
 
 void LabelEditor::closeEvent( TQCloseEvent* e )
diff --git a/kbarcode/mimesources.cpp b/kbarcode/mimesources.cpp
index 3213c4a..e065d5c 100644
--- a/kbarcode/mimesources.cpp
+++ b/kbarcode/mimesources.cpp
@@ -105,7 +105,7 @@ bool DocumentItemDrag::decode( TQMimeSource* mime, MyCanvasView* cv, TokenProvid
         if( !e.isNull() )
         {
             XMLUtils xml;
-            DocumentItem* item = NULL;
+            DocumentItem* item = nullptr;
             if( xml.readXMLDocumentItem( &e, &item, token ) )
             {            
                 DragCommand* dc = new DragCommand( cv, item );
diff --git a/kbarcode/mimesources.h b/kbarcode/mimesources.h
index 7ebeffe..8e8f53f 100644
--- a/kbarcode/mimesources.h
+++ b/kbarcode/mimesources.h
@@ -29,7 +29,7 @@ class DocumentItemDrag : public TQStoredDrag {
     TQ_OBJECT
   
     public:
-        DocumentItemDrag( TQWidget* dragSource = NULL, const char* name = 0 );
+        DocumentItemDrag( TQWidget* dragSource = nullptr, const char* name = 0 );
         
         static TQString mimeType();
         
diff --git a/kbarcode/multilineeditdlg.cpp b/kbarcode/multilineeditdlg.cpp
index 7f8e3fc..17bc555 100644
--- a/kbarcode/multilineeditdlg.cpp
+++ b/kbarcode/multilineeditdlg.cpp
@@ -292,7 +292,7 @@ void MultiLineEditor::spellCheckDone(const TQString & buffer)
 
 void MultiLineEditor::save()
 {
-    TQString name = KFileDialog::getSaveFileName ( NULL, "*", this );
+    TQString name = KFileDialog::getSaveFileName ( nullptr, "*", this );
     if( name.isEmpty() )
         return;
 
diff --git a/kbarcode/mycanvasview.cpp b/kbarcode/mycanvasview.cpp
index 8d46096..3dd98de 100644
--- a/kbarcode/mycanvasview.cpp
+++ b/kbarcode/mycanvasview.cpp
@@ -191,7 +191,7 @@ void MyCanvasView::contentsMouseMoveEvent(TQMouseEvent* e)
         } else {
             
             if( canv->grid() ) {
-                snapPoint(&p, NULL ) ;
+                snapPoint(&p, nullptr ) ;
             }
             
 	    LabelUtils l;
diff --git a/kbarcode/pixmapbarcode.cpp b/kbarcode/pixmapbarcode.cpp
index 5ca8584..37cf749 100644
--- a/kbarcode/pixmapbarcode.cpp
+++ b/kbarcode/pixmapbarcode.cpp
@@ -127,7 +127,7 @@ void PixmapBarcode::drawBarcode( TQPainter & painter, int x, int y )
 
 bool PixmapBarcode::createPixmap( TQPixmap* target, int resx, int resy )
 {
-    char* postscript = NULL;
+    char* postscript = nullptr;
     long postscript_size = 0;
     TQString cmd;
     bool bMonocrome;
@@ -272,7 +272,7 @@ bool PixmapBarcode::readFromPipe( const char* command, char** buffer, long* buff
     }
 
     char* buf = (char*)malloc( BUFFER_SIZE );
-    char* tmp = NULL;
+    char* tmp = nullptr;
     int s     = 0;
 
     *buffer_size = 0;
diff --git a/kbarcode/propertywidget.cpp b/kbarcode/propertywidget.cpp
index 24debfc..25dbd45 100644
--- a/kbarcode/propertywidget.cpp
+++ b/kbarcode/propertywidget.cpp
@@ -519,7 +519,7 @@ void PropertyImage::applySettings( DocumentItem* item, KMacroCommand* command )
 	if( !imgUrl->url().isEmpty() )
 	{
 	    if( !pix.load( imgUrl->url() ) )
-		KMessageBox::error( NULL, TQString( i18n("Image format not supported for file: %1") ).arg( imgUrl->url() ) );
+		KMessageBox::error( nullptr, TQString( i18n("Image format not supported for file: %1") ).arg( imgUrl->url() ) );
 	}
 	else
 	{
diff --git a/kbarcode/purepostscript.cpp b/kbarcode/purepostscript.cpp
index b08463f..0ed4fc4 100644
--- a/kbarcode/purepostscript.cpp
+++ b/kbarcode/purepostscript.cpp
@@ -198,7 +198,7 @@ TQRect PurePostscriptBarcode::bbox( const char* postscript, long postscript_size
 {
     const char* gs_bbox = "gs -sDEVICE=bbox -sNOPAUSE -q %1 -c showpage quit 2>&1";
 
-    char*   buffer = NULL;
+    char*   buffer = nullptr;
     long    len    = 0;
     TQRect   size;
 
diff --git a/kbarcode/sqltables.cpp b/kbarcode/sqltables.cpp
index b3e5a0d..e1ec39a 100644
--- a/kbarcode/sqltables.cpp
+++ b/kbarcode/sqltables.cpp
@@ -85,7 +85,7 @@ SqlTables::SqlTables( TQObject* parent )
     drivers.insert( "TQSQLITE", new SQLiteDescription() );
     drivers.insert( "TQODBC3", new SQLiteDescription() );
 
-    db = NULL;
+    db = nullptr;
     connected = false;
     loadConfig();
 
@@ -96,7 +96,7 @@ SqlTables::~SqlTables()
 {
 }
 
-SqlTables* SqlTables::instance = NULL;
+SqlTables* SqlTables::instance = nullptr;
 
 SqlTables* SqlTables::getInstance()
 {
@@ -318,7 +318,7 @@ void SqlTables::importData( const TQString & filename, TQSqlDatabase* db )
 
     if( filename.isEmpty() || !db->isOpen() ) // quick escape
     {
-        KMessageBox::error( NULL, i18n("Data file for import not found. Continuing without importing data. Please check your KBarcode installation.") );
+        KMessageBox::error( nullptr, i18n("Data file for import not found. Continuing without importing data. Please check your KBarcode installation.") );
         return;
     }
 
diff --git a/kbarcode/tbarcode2.cpp b/kbarcode/tbarcode2.cpp
index af0d9e0..e6841c4 100644
--- a/kbarcode/tbarcode2.cpp
+++ b/kbarcode/tbarcode2.cpp
@@ -31,6 +31,7 @@ TBarcodeOptions::TBarcodeOptions()
     defaults();
 }
 
+
 void TBarcodeOptions::defaults()
 {
     m_escape = false;
@@ -133,7 +134,7 @@ TQRect TBarcode2::bbox( const char* postscript, long postscript_size )
 {
     const char* gs_bbox = "gs -sDEVICE=bbox -sNOPAUSE -q %1 -c showpage quit 2>&1";
 
-    char*   buffer = NULL;
+    char*   buffer = nullptr;
     long    len    = 0;
     TQRect   size;
 
@@ -155,4 +156,3 @@ TQRect TBarcode2::bbox( const char* postscript, long postscript_size )
     return size;
 
 }
-
diff --git a/kbarcode/tcanvasitem.cpp b/kbarcode/tcanvasitem.cpp
index 8259be2..71da719 100644
--- a/kbarcode/tcanvasitem.cpp
+++ b/kbarcode/tcanvasitem.cpp
@@ -28,7 +28,7 @@ TCanvasItem::TCanvasItem( MyCanvasView* cv )
       ReferenceCounted()
 {
     m_view = cv;
-    m_item = NULL;
+    m_item = nullptr;
     show();
 }
 
@@ -152,7 +152,7 @@ void TCanvasItem::drawShape (TQPainter & painter)
 void TCanvasItem::setItem (DocumentItem* item) 
 {
     if( m_item )
-        m_item->setCanvasItem( NULL );
+        m_item->setCanvasItem( nullptr );
         
     m_item = item;    
     
diff --git a/kbarcode/tec.cpp b/kbarcode/tec.cpp
index 7fffe12..c66430f 100644
--- a/kbarcode/tec.cpp
+++ b/kbarcode/tec.cpp
@@ -472,7 +472,7 @@ return result;
 }
 
 TQString getData(const TQString &etext, const TQString &art, const TQString &group, const TQString &id){
-    TokenProvider token( NULL );
+    TokenProvider token( nullptr );
     token.setArticleNo( art );
     token.setGroup( group );
     token.setCustomerNo( id );
diff --git a/kbarcode/tokenprovider.cpp b/kbarcode/tokenprovider.cpp
index ef002f2..84b4926 100644
--- a/kbarcode/tokenprovider.cpp
+++ b/kbarcode/tokenprovider.cpp
@@ -152,8 +152,8 @@ TokenProvider::TokenProvider( TQPaintDevice* paintdevice )
     m_page = 0;
     m_update = false;
     m_contains_update = false;
-    m_findUserVarsList = NULL;
-    m_address = NULL;
+    m_findUserVarsList = nullptr;
+    m_address = nullptr;
 
     // default value for serial that should work with all barcodes
     m_serial = "0000000";
@@ -180,9 +180,9 @@ TokenProvider::~TokenProvider()
 TQValueList<tCategories> TokenProvider::s_categories;
 TQMap<TokenProvider::ECategories,TQString> TokenProvider::s_captions;
 #ifdef NO_KJS_EMBED
-KJS::Interpreter* TokenProvider::s_interpreter = NULL;
+KJS::Interpreter* TokenProvider::s_interpreter = nullptr;
 #else
-KJSEmbed::KJSEmbedPart* TokenProvider::s_interpreter = NULL;
+KJSEmbed::KJSEmbedPart* TokenProvider::s_interpreter = nullptr;
 #endif // NO_KJS_EMBED
 
 bool TokenProvider::hasJavaScript()
@@ -416,7 +416,7 @@ TQStringList TokenProvider::listUserVars()
 	    findBrackets( t, &TokenProvider::processUserVars );
     }
 
-    m_findUserVarsList = NULL;
+    m_findUserVarsList = nullptr;
 
     lst.sort();
     return lst;
diff --git a/kbarcode/xmlutils.cpp b/kbarcode/xmlutils.cpp
index 51e2c20..2ae2a10 100644
--- a/kbarcode/xmlutils.cpp
+++ b/kbarcode/xmlutils.cpp
@@ -202,7 +202,7 @@ void XMLUtils::readDocumentItems( DocumentItemList* list, TQDomDocument* doc, To
             TQDomElement e = n.toElement(); // try to convert the node to an element.
             if( !e.isNull() )
             {
-                DocumentItem* item = NULL;
+                DocumentItem* item = nullptr;
                 if( readXMLDocumentItem( &e, &item, token ) )
                     list->push_back( item );
             }
@@ -339,7 +339,7 @@ Definition* XMLUtils::readDefinition( TQDomElement* tag )
     // The label was written by KBarcode <= 1.2.0
     Definition* d = new Definition( label_def_id );
     if( type.isEmpty() && producer.isEmpty() ) {
-        KMessageBox::information( NULL,
+        KMessageBox::information( nullptr,
             i18n("<qt>This appears file appears to be created by an older version of KBarcode.<br>"
                  "Please check if the used label definition is correct:<br>"
                  "<b>") + d->getProducer() + " " + d->getType() + "</b><br>"
-- 
cgit v1.2.3

