From 9158ebff4cbe8dcae207c7edf0fbf7ebe11303bf Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 20 Sep 2026 12:01:30 -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/interface.cpp     |  4 ++--
 src/knetstats.cpp     |  8 ++++----
 src/knetstats.h       |  2 +-
 src/knetstatsview.cpp |  4 ++--
 src/main.cpp          | 12 ++++++------
 src/statistics.h      |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/interface.cpp b/src/interface.cpp
index b7a927c..306672f 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -13,7 +13,7 @@
 #include <tdeapplication.h>
 #include <tdeconfig.h>
 
-Interface::Interface(KNetStats* parent, const TQString& name) : mName(name), mView(0), mParent(parent) {
+Interface::Interface(KNetStats* parent, const TQString& name) : mName(name), mView(nullptr), mParent(parent) {
 	update();
 }
 
@@ -34,7 +34,7 @@ void Interface::update() {
 void Interface::setVisible(bool visible) {
 	if (!visible) {
 		delete mView;
-		mView = 0;
+		mView = nullptr;
 	} else if (visible && !mView)
 		mView = new KNetStatsView(mParent, mName);
 }
diff --git a/src/knetstats.cpp b/src/knetstats.cpp
index 8c50104..7c1b7c5 100644
--- a/src/knetstats.cpp
+++ b/src/knetstats.cpp
@@ -43,7 +43,7 @@
 #include <kiconloader.h>
 #include <kpushbutton.h>
 
-KNetStats::KNetStats() : TQWidget(0, "knetstats"), mConfigure(0), mBoot(true) {
+KNetStats::KNetStats() : TQWidget(nullptr, "knetstats"), mConfigure(nullptr), mBoot(true) {
 	setupUi();
 	int count;
 	detectNewInterfaces(&count);
@@ -86,7 +86,7 @@ void KNetStats::setupUi() {
 TQStringList KNetStats::scanInterfaces() {
 	TQDir dir("/sys/class/net");
 	if (!dir.exists()) {
-		KMessageBox::error(0, i18n("You need kernel 2.6.x with support to the /sys filesystem."));
+		KMessageBox::error(nullptr, i18n("You need kernel 2.6.x with support to the /sys filesystem."));
 		return TQStringList();
 	} else {
 		TQStringList list = dir.entryList(TQDir::Dirs);
@@ -118,7 +118,7 @@ void KNetStats::configOk() {
 	if (mConfigure->canSaveConfig()) {
 		saveConfig( mConfigure->options() );
 		delete mConfigure;
-		mConfigure = 0;
+		mConfigure = nullptr;
 	}
 }
 
@@ -129,7 +129,7 @@ void KNetStats::configApply() {
 
 void KNetStats::configCancel() {
 	delete mConfigure;
-	mConfigure = 0;
+	mConfigure = nullptr;
 }
 
 void KNetStats::saveConfig(const OptionsMap& options) {
diff --git a/src/knetstats.h b/src/knetstats.h
index 294fc3c..24d2490 100644
--- a/src/knetstats.h
+++ b/src/knetstats.h
@@ -73,7 +73,7 @@ public slots:
 	*	Search for new interfaces
 	*	\param count_ptr	Interface count, store the number of new <strong>visible</strong> interfaces found.
 	*/
-	void detectNewInterfaces(int* count_ptr = 0);
+	void detectNewInterfaces(int* count_ptr = nullptr);
 private:
 	TDEPopupMenu* mContextMenu; // help menu usado por todos os tray icons
 	Configure* mConfigure;
diff --git a/src/knetstatsview.cpp b/src/knetstatsview.cpp
index 278164a..00d3366 100644
--- a/src/knetstatsview.cpp
+++ b/src/knetstatsview.cpp
@@ -64,7 +64,7 @@ extern "C" {
 extern const char* programName;
 
 KNetStatsView::KNetStatsView(KNetStats* parent, const TQString& interface)
-: KSystemTray(parent, 0), mSysDevPath("/sys/class/net/"+interface+"/"), mInterface(interface) {
+: KSystemTray(parent, nullptr), mSysDevPath("/sys/class/net/"+interface+"/"), mInterface(interface) {
 	mFdSock = 0;
 	mFirstUpdate = true;
 	mMaxSpeedAge = 0;
@@ -73,7 +73,7 @@ KNetStatsView::KNetStatsView(KNetStats* parent, const TQString& interface)
 	mConnected = mCarrier = true;
 	mTotalBytesRx = mTotalBytesTx = mTotalPktRx = mTotalPktTx = 0;
 	mSpeedBufferPtr = mSpeedHistoryPtr = 0;
-	mStatistics = 0;
+	mStatistics = nullptr;
 
 	readOptions(interface, &mOptions, true);
 	resetBuffers();
diff --git a/src/main.cpp b/src/main.cpp
index b35cf41..fc0e2c1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -39,18 +39,18 @@ int main( int argc, char** argv )
 						  I18N_NOOP( "A network device monitor." ),	// description
 						  TDEAboutData::License_GPL,					// license
 	                      "(C) 2004-2005 Hugo Parente Lima",		// copyright
-						  0,
+	                      nullptr,
 						  "http://knetstats.sourceforge.net",		// homepage
 						  "hugo_pl@users.sourceforge.net");			// bug email address
 	aboutData.setTranslator(I18N_NOOP("_: NAME OF TRANSLATORS"), I18N_NOOP("_: EMAIL OF TRANSLATORS"));
-	aboutData.addAuthor( "Hugo Parente Lima", 0, "hugo_pl@users.sourceforge.net" );
+	aboutData.addAuthor( "Hugo Parente Lima", nullptr, "hugo_pl@users.sourceforge.net" );
 
 	// Credits
-	aboutData.addCredit( "Thomas Windheuser", I18N_NOOP("SCons help, Debian packages, etc."), 0);
-	aboutData.addCredit( "KNemo", I18N_NOOP("Icon themes"), 0,
+	aboutData.addCredit( "Thomas Windheuser", I18N_NOOP("SCons help, Debian packages, etc."), nullptr);
+	aboutData.addCredit( "KNemo", I18N_NOOP("Icon themes"), nullptr,
 						"http://kde-apps.org/content/show.php?content=12956" );
 	// translators
-	aboutData.addCredit( "Ilyas Bakirov, Roberto Leandrini, Carlos Ortiz, Henrik Gebauer, Edward Romantsov, Wiktor Wandachowicz, Guillaume Savaton, Petar Toushkov, Liu Di", I18N_NOOP("KNetStats translation to other languages"), 0);
+	aboutData.addCredit( "Ilyas Bakirov, Roberto Leandrini, Carlos Ortiz, Henrik Gebauer, Edward Romantsov, Wiktor Wandachowicz, Guillaume Savaton, Petar Toushkov, Liu Di", I18N_NOOP("KNetStats translation to other languages"), nullptr);
 
 	TDECmdLineArgs::init( argc, argv, &aboutData );
 	TDEApplication::disableAutoDcopRegistration();
@@ -58,7 +58,7 @@ int main( int argc, char** argv )
 	TDEApplication app;
 	KNetStats knetstats;
 	if (!knetstats.numInterfaces()) {
-		KMessageBox::error(0, i18n("You don't have any network interface.\nKNetStats will quit now."));
+		KMessageBox::error(nullptr, i18n("You don't have any network interface.\nKNetStats will quit now."));
 		return 1;
 	}
 	return app.exec();
diff --git a/src/statistics.h b/src/statistics.h
index b317bab..4e62bd1 100644
--- a/src/statistics.h
+++ b/src/statistics.h
@@ -32,7 +32,7 @@ class Statistics : public StatisticsBase
 
 
 public:
-	Statistics(KNetStatsView* parent = 0, const char *name = 0);
+	Statistics(KNetStatsView* parent = nullptr, const char *name = nullptr);
 
 	/**
 	*	Formats a numberic byte representation
-- 
cgit v1.2.3

