From 0b60e91566260bf2a09769f4dfa78c60777a30c8 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 14 Nov 2026 07:12:09 -0300
Subject: KColorEdit: Replace zero pointer constants with nullptr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Replace zero pointer constants with nullptr

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 kcoloredit/colorselector.h           |  2 +-
 kcoloredit/gradientselection.h       |  2 +-
 kcoloredit/imageselection.h          |  2 +-
 kcoloredit/kcolorchooser.cpp         |  4 ++--
 kcoloredit/kcoloredit.cpp            |  6 +++---
 kcoloredit/kcoloredit.h              |  2 +-
 kcoloredit/kcoloreditdoc.cpp         | 20 ++++++++++----------
 kcoloredit/kcoloreditdoc.h           |  2 +-
 kcoloredit/kcoloreditview.h          |  2 +-
 kcoloredit/kxycolorselector.h        |  2 +-
 kcoloredit/kzcolorselector.h         |  2 +-
 kcoloredit/loadpalettedlg.h          |  2 +-
 kcoloredit/main.cpp                  |  4 ++--
 kcoloredit/palette.h                 |  2 +-
 kcoloredit/paletteview.h             |  2 +-
 kcoloredit/paletteviewscrolledarea.h |  2 +-
 kcoloredit/texteditselection.h       |  2 +-
 17 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/kcoloredit/colorselector.h b/kcoloredit/colorselector.h
index c0f6f4ee..917162f5 100644
--- a/kcoloredit/colorselector.h
+++ b/kcoloredit/colorselector.h
@@ -35,7 +35,7 @@ class ColorSelector : public TQWidget  {
 
 public:
 	/** constructs a color selector widget */
-	ColorSelector(TQWidget *parent=0, const char *name=0);
+	ColorSelector(TQWidget *parent=nullptr, const char *name=nullptr);
 	~ColorSelector();
 	/** @return the selected color */
 	const Color& color();
diff --git a/kcoloredit/gradientselection.h b/kcoloredit/gradientselection.h
index 3f98b0cf..490500f9 100644
--- a/kcoloredit/gradientselection.h
+++ b/kcoloredit/gradientselection.h
@@ -36,7 +36,7 @@ class GradientSelection : public TQWidget  {
 
 public:
 	/** Constructs the widget */
-	GradientSelection(TQWidget *parent=0, const char *name=0);
+	GradientSelection(TQWidget *parent=nullptr, const char *name=nullptr);
 	~GradientSelection();
 	/** Enables or disables the color synchronize button */
 	void enableSynchronizeColorButton(bool enable);
diff --git a/kcoloredit/imageselection.h b/kcoloredit/imageselection.h
index 7846ef31..1c5c906d 100644
--- a/kcoloredit/imageselection.h
+++ b/kcoloredit/imageselection.h
@@ -31,7 +31,7 @@ class ImageSelection : public TQWidget  {
 
 public:
 	/** constructs the widget */
-	ImageSelection(TQWidget *parent=0, const char *name=0);
+	ImageSelection(TQWidget *parent=nullptr, const char *name=nullptr);
 	~ImageSelection();
 	
 signals:
diff --git a/kcoloredit/kcolorchooser.cpp b/kcoloredit/kcolorchooser.cpp
index 1759cf14..ad7f0ee0 100644
--- a/kcoloredit/kcolorchooser.cpp
+++ b/kcoloredit/kcolorchooser.cpp
@@ -37,7 +37,7 @@ static const char version[] = "v1.0.1";
 
 static TDECmdLineOptions options[] =
 {
-   { "print", I18N_NOOP("Print the selected color to stdout"), 0 },
+   { "print", I18N_NOOP("Print the selected color to stdout"), nullptr },
    TDECmdLineLastOption
 };
 	
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
   TDEAboutData aboutData( "kcolorchooser", I18N_NOOP("KColorChooser"),
 		version, description, TDEAboutData::License_BSD,
 		"(c) 2000, Waldo Bastian");
-  aboutData.addAuthor("Waldo Bastian",0, "bastian@kde.org");
+  aboutData.addAuthor("Waldo Bastian",nullptr, "bastian@kde.org");
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options );
 
diff --git a/kcoloredit/kcoloredit.cpp b/kcoloredit/kcoloredit.cpp
index 1e478fe4..fb46d4cd 100644
--- a/kcoloredit/kcoloredit.cpp
+++ b/kcoloredit/kcoloredit.cpp
@@ -225,7 +225,7 @@ void KColorEditApp::slotFileOpen() {
       if(!fileToOpen.isEmpty())
       {
         if(!doc->openDocument( fileToOpen )) {
-          KMessageBox::sorry(0, doc->errorString());
+          KMessageBox::sorry(nullptr, doc->errorString());
         } else {
           setCaption(doc->title());
           m_actRecent->addURL( KURL::fromPathOrURL( fileToOpen ) );
@@ -267,7 +267,7 @@ bool KColorEditApp::slotFileSaveAs()
                             "Do you want to overwrite it?"),
                        i18n("Warning"), i18n("Overwrite"), KStdGuiItem::cancel() ) == KMessageBox::Yes) {
                 if(!doc->saveDocument( newName )) {
-                    KMessageBox::sorry(0, doc->errorString());
+                    KMessageBox::sorry(nullptr, doc->errorString());
                     result = false;
                 } else {
                     doc->setTitle(saveAsInfo.fileName());
@@ -306,7 +306,7 @@ void KColorEditApp::slotQuit()
   TDEMainWindow* w;
   if(memberList)
   {
-    for(w=memberList->first(); w!=0; w=memberList->next())
+    for(w=memberList->first(); w; w=memberList->next())
     {
       // only close the window if the closeEvent is accepted. If the user presses Cancel on the saveModified() dialog,
       // the window and the application stay open.
diff --git a/kcoloredit/kcoloredit.h b/kcoloredit/kcoloredit.h
index 75a8b096..93ed76f4 100644
--- a/kcoloredit/kcoloredit.h
+++ b/kcoloredit/kcoloredit.h
@@ -67,7 +67,7 @@ class KColorEditApp : public TDEMainWindow
 
     /** opens a file specified by commandline option
      */
-    void openDocumentFile(const char *_cmdl=0);
+    void openDocumentFile(const char *_cmdl=nullptr);
     /** returns a pointer to the current document connected to the TDEMainWindow instance and is used by
      * the View class to access the document object's methods
      */
diff --git a/kcoloredit/kcoloreditdoc.cpp b/kcoloredit/kcoloreditdoc.cpp
index dac11879..83248790 100644
--- a/kcoloredit/kcoloreditdoc.cpp
+++ b/kcoloredit/kcoloreditdoc.cpp
@@ -81,7 +81,7 @@ void KColorEditDoc::slotRedrawAllViews(KColorEditView *sender, bool newDocument)
  KColorEditView *w;
   if(m_pViewList)
   {
-    for(w=m_pViewList->first(); w!=0; w=m_pViewList->next())
+    for(w=m_pViewList->first(); w; w=m_pViewList->next())
     {
       if(w!=sender)
         w->redraw(newDocument);
@@ -93,7 +93,7 @@ void KColorEditDoc::slotChangeViewMode(bool viewColorNames) {
  KColorEditView *w;
   if(m_pViewList)
   {
-    for(w=m_pViewList->first(); w!=0; w=m_pViewList->next())
+    for(w=m_pViewList->first(); w; w=m_pViewList->next())
     {
       w->slotViewColorNames(viewColorNames);
     }
@@ -122,7 +122,7 @@ bool KColorEditDoc::saveModified()
              completed = saveDocument(absFilePath());
        	   };
        	   if(!completed)
-							KMessageBox::sorry(0, errorString());
+							KMessageBox::sorry(nullptr, errorString());
            break;
 
       case KMessageBox::No:
@@ -155,7 +155,7 @@ bool KColorEditDoc::newDocument()
   setTitle( i18n("Untitled") );
   setPaletteCursorPos(0);
   setPaletteSelection(0, 0);
-  slotRedrawAllViews(0, true);
+  slotRedrawAllViews(nullptr, true);
   return true;
 }
 
@@ -174,7 +174,7 @@ bool KColorEditDoc::openDocument(const TQString& filename) {
 		setTitle( fileInfo.fileName() );
 		setPaletteCursorPos(m_palette.length());
 		setPaletteSelection(0, 0);
-		slotRedrawAllViews(0, true);
+		slotRedrawAllViews(nullptr, true);
         KColorEditApp *window=(KColorEditApp*)parent();
         window->setCaption(m_title);
 	}
@@ -234,7 +234,7 @@ int KColorEditDoc::paletteSelectionEnd() const {
 void KColorEditDoc::copyToClipboard(Palette& palette) {
 	TQString text;
 	TQTextOStream stream(&text);
-	palette.save(stream, 0, false);
+	palette.save(stream, nullptr, false);
 	TDEApplication::clipboard()->setText(text);
 
     emit clipboardChanged();
@@ -253,7 +253,7 @@ void KColorEditDoc::cut() {
 	setPaletteCursorPos(paletteSelectionBegin());
 	setPaletteSelection(0, 0);
 	setModified(true);
-	slotRedrawAllViews(0);
+	slotRedrawAllViews(nullptr);
 }
 
 void KColorEditDoc::paste() {
@@ -266,7 +266,7 @@ void KColorEditDoc::paste() {
 		setPaletteSelection(paletteCursorPos(), paletteCursorPos() +
 			palettePaste.length());
 		setModified(true);
-		slotRedrawAllViews(0);
+		slotRedrawAllViews(nullptr);
 	}
 }
 
@@ -278,7 +278,7 @@ void KColorEditDoc::insert(int index, const Color& color) {
     setPaletteCursorPos( index );
 	setPaletteSelection(0, 0);
 	setModified(true);
-	slotRedrawAllViews(0);
+	slotRedrawAllViews(nullptr);
 }
 
 void KColorEditDoc::replace(int index, const Color& color) {
@@ -288,6 +288,6 @@ void KColorEditDoc::replace(int index, const Color& color) {
 	m_paletteHistory.replace(index, paletteReplace);
 	setPaletteSelection(0, 0);
 	setModified(true);
-	slotRedrawAllViews(0);
+	slotRedrawAllViews(nullptr);
 }
 #include "kcoloreditdoc.moc"
diff --git a/kcoloredit/kcoloreditdoc.h b/kcoloredit/kcoloreditdoc.h
index e4b672ed..6648c8fe 100644
--- a/kcoloredit/kcoloreditdoc.h
+++ b/kcoloredit/kcoloreditdoc.h
@@ -51,7 +51,7 @@ class KColorEditDoc : public TQObject
 
   public:
     /** Constructor for the fileclass of the application */
-    KColorEditDoc(TQWidget *parent, const char *name=0);
+    KColorEditDoc(TQWidget *parent, const char *name=nullptr);
     /** Destructor for the fileclass of the application */
     ~KColorEditDoc();
 
diff --git a/kcoloredit/kcoloreditview.h b/kcoloredit/kcoloreditview.h
index 003a4087..79fa5f46 100644
--- a/kcoloredit/kcoloreditview.h
+++ b/kcoloredit/kcoloreditview.h
@@ -47,7 +47,7 @@ class KColorEditView : public TQSplitter {
 
   public:
     /** Constructor for the main view */
-    KColorEditView(TQWidget *parent = 0, const char *name = 0);
+    KColorEditView(TQWidget *parent = nullptr, const char *name = nullptr);
     /** Destructor for the main view */
     ~KColorEditView();
 
diff --git a/kcoloredit/kxycolorselector.h b/kcoloredit/kxycolorselector.h
index c785a293..ef903461 100644
--- a/kcoloredit/kxycolorselector.h
+++ b/kcoloredit/kxycolorselector.h
@@ -47,7 +47,7 @@ public:
 	/** Constructs a two-dimensional color component selector widget,
 	 *  with a type TYPE_NONE and ranges 0 .. MAX_COLOR_COMPONENT_VALUE
 	 */
-	KXYColorSelector(TQWidget *parent=0, const char *name=0);
+	KXYColorSelector(TQWidget *parent=nullptr, const char *name=nullptr);
 	~KXYColorSelector();
 	/** Set the type of the selector */
 	void setType(const int type);
diff --git a/kcoloredit/kzcolorselector.h b/kcoloredit/kzcolorselector.h
index 23f1f1d4..4ff7621b 100644
--- a/kcoloredit/kzcolorselector.h
+++ b/kcoloredit/kzcolorselector.h
@@ -38,7 +38,7 @@ public:
 	       TYPE_V = 2 };
 
 	/** Constructs the widget */
-	KZColorSelector(TQt::Orientation o, TQWidget *parent=0, const char *name=0);
+	KZColorSelector(TQt::Orientation o, TQWidget *parent=nullptr, const char *name=nullptr);
 	~KZColorSelector();
 	/** Sets the selector type */
 	void setType(const int type);
diff --git a/kcoloredit/loadpalettedlg.h b/kcoloredit/loadpalettedlg.h
index 6f752ee5..fe653005 100644
--- a/kcoloredit/loadpalettedlg.h
+++ b/kcoloredit/loadpalettedlg.h
@@ -32,7 +32,7 @@ class LoadPaletteDlg : public KDialogBase  {
 public:
 	/** constructs the dialog
 	 */
-	LoadPaletteDlg(TQWidget *parent = 0, const char *name = 0);
+	LoadPaletteDlg(TQWidget *parent = nullptr, const char *name = nullptr);
 	~LoadPaletteDlg();
 	/** @return the fetched file name
 	 */
diff --git a/kcoloredit/main.cpp b/kcoloredit/main.cpp
index ea1ec9d3..e048738f 100644
--- a/kcoloredit/main.cpp
+++ b/kcoloredit/main.cpp
@@ -29,7 +29,7 @@ static const char description[] =
 
 static TDECmdLineOptions options[] =
 {
-  { "+[File]", I18N_NOOP("File to open"), 0 },
+  { "+[File]", I18N_NOOP("File to open"), nullptr },
   TDECmdLineLastOption
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
@@ -40,7 +40,7 @@ int main(int argc, char *argv[])
 	TDEAboutData aboutData( "kcoloredit", I18N_NOOP("KColorEdit"),
 		VERSION, description, TDEAboutData::License_GPL,
 		"(c) 2000, Artur Rataj");
-	aboutData.addAuthor("Artur Rataj",0, "art@zeus.polsl.gliwice.pl");
+	aboutData.addAuthor("Artur Rataj",nullptr, "art@zeus.polsl.gliwice.pl");
     aboutData.addCredit( "Nadeem Hasan", I18N_NOOP( "Rewrote UI code "
         "to be KDE standards compliant" ), "nhasan@kde.org" );
 	TDECmdLineArgs::init( argc, argv, &aboutData );
diff --git a/kcoloredit/palette.h b/kcoloredit/palette.h
index a363ada4..2d0a2c9a 100644
--- a/kcoloredit/palette.h
+++ b/kcoloredit/palette.h
@@ -72,7 +72,7 @@ public:
 	 *  If saveName is true, palette name is saved.
 	 *  @return whether save was succesfull
 	 */
-	bool save(TQTextStream& stream, const TQFile* file = 0, bool saveName = true);
+	bool save(TQTextStream& stream, const TQFile* file = nullptr, bool saveName = true);
 	/** Saves a palette to a file
 	 *  @return whether save was succesfull
 	 */
diff --git a/kcoloredit/paletteview.h b/kcoloredit/paletteview.h
index e01cce37..ab9809c8 100644
--- a/kcoloredit/paletteview.h
+++ b/kcoloredit/paletteview.h
@@ -38,7 +38,7 @@ public:
 	 *  The effective cell sizes may be adjusted to fit the widget sizes.
 	 */
 	PaletteView(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing,
-			KColorEditView* view, TQWidget *parent = 0, const char *name=0);
+			KColorEditView* view, TQWidget *parent = nullptr, const char *name=nullptr);
 	~PaletteView();
 	/** Calls redraw() in scrolledArea */
 	void redraw();
diff --git a/kcoloredit/paletteviewscrolledarea.h b/kcoloredit/paletteviewscrolledarea.h
index 8ee0cd9a..9746d781 100644
--- a/kcoloredit/paletteviewscrolledarea.h
+++ b/kcoloredit/paletteviewscrolledarea.h
@@ -40,7 +40,7 @@ public:
 	PaletteViewScrolledArea(const int defaultCellWidth, const int defaultCellHeight,
 		const int cellSpacing, TQScrollBar* scrollBar,
 		TQScrollBar* hScrollBar, KColorEditView* view,
-		TQWidget* parent = 0, const char* name = 0);
+		TQWidget* parent = nullptr, const char* name = nullptr);
 	~PaletteViewScrolledArea();
 	/** Sets cells sizes and then calls repaintPalette() */
 	void redraw();
diff --git a/kcoloredit/texteditselection.h b/kcoloredit/texteditselection.h
index fcee626a..a678c685 100644
--- a/kcoloredit/texteditselection.h
+++ b/kcoloredit/texteditselection.h
@@ -34,7 +34,7 @@ class TextEditSelection : public TQWidget  {
 
 public:
 	/** Constructs the widget */
-	TextEditSelection(TQWidget *parent=0, const char *name=0);
+	TextEditSelection(TQWidget *parent=nullptr, const char *name=nullptr);
 	~TextEditSelection();
 	
 signals:
-- 
cgit v1.2.3

