From cf3deddd29647551acec832bf7884333c0150c67 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Tue, 22 Sep 2026 23:30:59 -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>
---
 mathemagics/keypad.h        |  4 ++--
 mathemagics/kparanoidline.h |  2 +-
 mathemagics/main.cpp        |  6 +++---
 mathemagics/mathemagics.cpp | 28 ++++++++++++++--------------
 mathemagics/mathemagics.h   |  4 ++--
 mathemagics/optiondialog.h  |  2 +-
 mathemagics/stacklevel.h    |  2 +-
 7 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/mathemagics/keypad.h b/mathemagics/keypad.h
index 311d6d5..14139ef 100644
--- a/mathemagics/keypad.h
+++ b/mathemagics/keypad.h
@@ -12,7 +12,7 @@ class CharButton : public TQPushButton
 	TQ_OBJECT
 
 public:
-	CharButton(const TQString &text, TQWidget *parent=0, const char *name=0);
+	CharButton(const TQString &text, TQWidget *parent=nullptr, const char *name=nullptr);
 	~CharButton() {}
 
 signals:
@@ -30,7 +30,7 @@ class MathKeypad : public TQWidget
 	TQ_OBJECT
 
 public:
-	MathKeypad(TQWidget *parent=0, const char *name=0);
+	MathKeypad(TQWidget *parent=nullptr, const char *name=nullptr);
 	~MathKeypad() {}
 
 signals:
diff --git a/mathemagics/kparanoidline.h b/mathemagics/kparanoidline.h
index c824f96..6459725 100644
--- a/mathemagics/kparanoidline.h
+++ b/mathemagics/kparanoidline.h
@@ -8,7 +8,7 @@ class KParanoidLine : public KLineEdit
   TQ_OBJECT
   
 public:
-	KParanoidLine(TQWidget *parent=0, const char *name=0);
+	KParanoidLine(TQWidget *parent=nullptr, const char *name=nullptr);
 	~KParanoidLine();
 
 signals:
diff --git a/mathemagics/main.cpp b/mathemagics/main.cpp
index 4227b25..c8ea37d 100644
--- a/mathemagics/main.cpp
+++ b/mathemagics/main.cpp
@@ -21,19 +21,19 @@ static const char *description =
 	
 static TDECmdLineOptions options[] =
 {
-	{ 0, 0, 0 }
+	{ nullptr, nullptr, nullptr }
 };
 
 int main(int argc, char *argv[])
 {
-	TDEAboutData aboutData( "mathemagics", I18N_NOOP("Mathemagics"), "1.1", description, TDEAboutData::License_BSD, "(c) 2002-2004, Jason Katz-Brown", 0, "http://katzbrown.com/mathemagics/", "jason@katzbrown.com");
+	TDEAboutData aboutData( "mathemagics", I18N_NOOP("Mathemagics"), "1.1", description, TDEAboutData::License_BSD, "(c) 2002-2004, Jason Katz-Brown", nullptr, "http://katzbrown.com/mathemagics/", "jason@katzbrown.com");
 	aboutData.addAuthor("Jason Katz-Brown", I18N_NOOP("Main author"), "jason@katzbrown.com");
 
 	TDECmdLineArgs::init(argc, argv, &aboutData);
 	TDECmdLineArgs::addCmdLineOptions(options);
 
 	TDEApplication a;
-	Mathemagics *mathemagics = new Mathemagics(0, "Mathemagics", TQt::WStyle_ContextHelp);
+	Mathemagics *mathemagics = new Mathemagics(nullptr, "Mathemagics", TQt::WStyle_ContextHelp);
 	a.setMainWidget(mathemagics);
 	mathemagics->show();
 	return a.exec();
diff --git a/mathemagics/mathemagics.cpp b/mathemagics/mathemagics.cpp
index 7499097..df61c22 100644
--- a/mathemagics/mathemagics.cpp
+++ b/mathemagics/mathemagics.cpp
@@ -67,9 +67,9 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
 	bigBox = new TQVBoxLayout(boxParent, KDialog::marginHint(), KDialog::spacingHint());
 
 	LineEdit = new EditAction(i18n("Values"), 0, this, TQ_SLOT(slotEnter()), actionCollection(), "lineedit");
-	HistoryBox = new ComboAction(i18n("History"), 0, 0, 0, actionCollection(), "history");
+	HistoryBox = new ComboAction(i18n("History"), 0, nullptr, nullptr, actionCollection(), "history");
 	
-	keypadAct = new TDEToggleAction(i18n("Show Keypad"), "Ctrl+K", 0, 0, actionCollection(), "keypad");
+	keypadAct = new TDEToggleAction(i18n("Show Keypad"), "Ctrl+K", nullptr, nullptr, actionCollection(), "keypad");
 	connect(keypadAct, TQ_SIGNAL(toggled(bool)), TQ_SLOT(toggleKeypad(bool)));
 
 	keypad = new MathKeypad(dummy, "Keypad");
@@ -89,7 +89,7 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
 	TQStringList options(i18n("Degrees"));
 	options.append(i18n("Radians"));
 	options.append(i18n("Grads"));
-	angGroup = new TDEListAction(i18n("Angle"), 0, 0, 0, actionCollection(), "angle");
+	angGroup = new TDEListAction(i18n("Angle"), 0, nullptr, nullptr, actionCollection(), "angle");
 	angGroup->setItems(options);
 
 	options.clear();
@@ -97,11 +97,11 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
 	options.append(i18n("Decimal"));
 	options.append(i18n("Octal"));
 	options.append(i18n("Binary"));
-	baseGroup = new TDEListAction(i18n("Base"), 0, 0, 0, actionCollection(), "base");
+	baseGroup = new TDEListAction(i18n("Base"), 0, nullptr, nullptr, actionCollection(), "base");
 	baseGroup->setItems(options);
 
 	TQStringList defaultFormulae;
-	formulae = new TDEListAction(i18n("&Formulae"), 0, 0, 0, actionCollection(), "formulae");
+	formulae = new TDEListAction(i18n("&Formulae"), 0, nullptr, nullptr, actionCollection(), "formulae");
 #include "formulae"
 	formulae->setItems(defaultFormulae);
 	formulae->setCurrentItem(-1);
@@ -127,8 +127,8 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
 	(void) new TDEAction("x^2", "Alt+Shift+S", this, TQ_SLOT(slotSquared()), actionCollection(), "x^2");
 	(void) new TDEAction("y^x", "Alt+^", this, TQ_SLOT(slotPower()), actionCollection(), "y^x");
 
-	InvButton = new TDEToggleAction("Inv", "Ctrl+I", 0, 0, actionCollection(), "inverse");
-	HypButton = new TDEToggleAction("Hyp", "Ctrl+H", 0, 0, actionCollection(), "hyperbolic");
+	InvButton = new TDEToggleAction("Inv", "Ctrl+I", nullptr, nullptr, actionCollection(), "inverse");
+	HypButton = new TDEToggleAction("Hyp", "Ctrl+H", nullptr, nullptr, actionCollection(), "hyperbolic");
 
 	// bitwise
 	(void) new TDEAction(i18n("And"), "Alt+A", this, TQ_SLOT(slotAnd()), actionCollection(), "bitwise_and");
@@ -181,7 +181,7 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
 
 	Stack = new TQValueList<double>;
 	SavedStack = new TQValueList<double>;
-	optionDialog = 0;
+	optionDialog = nullptr;
 
 	// how long do status msgs stay up? in ms
 	dispTime = 1500;
@@ -1084,11 +1084,11 @@ void Mathemagics::closeEvent(TQCloseEvent * /*e*/)
 
 void Mathemagics::slotConfigure()
 {
-	if (optionDialog == 0)
+	if (optionDialog == nullptr)
 	{
 		optionDialog = new ConfigureDialog(topLevelWidget());
 
-		if (optionDialog == 0) 
+		if (optionDialog == nullptr)
 			return;
 
 		connect(optionDialog, TQ_SIGNAL(hidden()),this,TQ_SLOT(slotConfigureHide()));
@@ -1106,10 +1106,10 @@ void Mathemagics::slotConfigureHide()
 
 void Mathemagics::slotConfigureDestroy()
 {
-	if (optionDialog != 0 && optionDialog->isVisible() == 0)
+	if (optionDialog != nullptr && optionDialog->isVisible() == 0)
 	{
 		delete optionDialog;
-		optionDialog = 0;
+		optionDialog = nullptr;
 	}
 }
 
@@ -1901,7 +1901,7 @@ void EditAction::unplug(TQWidget *w)
 	int idx = findContainer(w);
 	toolBar->removeItem(menuId(idx));
 	removeContainer(idx);
-	m_combo = 0L;
+	m_combo = nullptr;
 }
 
 void EditAction::clear()
@@ -1963,7 +1963,7 @@ void ComboAction::unplug(TQWidget *w)
 	toolBar->removeItem(menuId(idx));
 
 	removeContainer(idx);
-	m_combo = 0L;
+	m_combo = nullptr;
 }
 
 TQGuardedPtr<TQComboBox> ComboAction::combo()
diff --git a/mathemagics/mathemagics.h b/mathemagics/mathemagics.h
index 3d2f6d3..eb3d008 100644
--- a/mathemagics/mathemagics.h
+++ b/mathemagics/mathemagics.h
@@ -35,7 +35,7 @@ class Mathemagics : public TDEMainWindow
 
 public:
 	/** construtor */
-	Mathemagics(TQWidget* parent=0, const char *name=0, WFlags f = 0);
+	Mathemagics(TQWidget* parent=nullptr, const char *name=nullptr, WFlags f = 0);
 	/** destructor */
 	~Mathemagics();
 
@@ -137,7 +137,7 @@ private:
 	bool getArgs(unsigned int num);
 	TQValueList<double> args;
 
-	double format(TQString theString, bool *ok=0);
+	double format(TQString theString, bool *ok=nullptr);
 	TQString format(double theDouble);
 
 	void saveStack();
diff --git a/mathemagics/optiondialog.h b/mathemagics/optiondialog.h
index 3f32427..a0816a7 100644
--- a/mathemagics/optiondialog.h
+++ b/mathemagics/optiondialog.h
@@ -16,7 +16,7 @@ class ConfigureDialog : public KDialogBase
 	TQ_OBJECT
 
 public:
-	ConfigureDialog(TQWidget *parent = 0, char *name = 0, bool modal = 0);
+	ConfigureDialog(TQWidget *parent = nullptr, char *name = nullptr, bool modal = 0);
 	~ConfigureDialog();
 
 signals:
diff --git a/mathemagics/stacklevel.h b/mathemagics/stacklevel.h
index 8f3aeef..6857f30 100644
--- a/mathemagics/stacklevel.h
+++ b/mathemagics/stacklevel.h
@@ -12,7 +12,7 @@ class StackLevel : public TQHBox
 	TQ_OBJECT
 
 public:
-	StackLevel(int, TQWidget *parent=0, const char *name=0);
+	StackLevel(int, TQWidget *parent=nullptr, const char *name=nullptr);
 	virtual void setEnabled(bool enabled);
 	TQLineEdit *edit() { return m_edit; }
 	TQPushButton *button() { return m_button; }
-- 
cgit v1.2.3

