From acb45eeb842bc0115b52355f093b3b19d7f82573 Mon Sep 17 00:00:00 2001
From: Laurent Montel <montel@kde.org>
Date: Mon, 20 Jan 2020 13:37:51 +0100
Subject: [PATCH] Use nullptr

---
 examples/cmssigner/certitem.h                 |  4 +--
 examples/cmssigner/prompter.h                 |  2 +-
 .../eventhandlerdemo/eventhandlerdemo.cpp     |  2 +-
 examples/keyloader/keyloader.cpp              |  2 +-
 examples/tlssocket/tlssocket.h                |  2 +-
 include/QtCrypto/qca_cert.h                   | 36 +++++++++----------
 include/QtCrypto/qca_core.h                   |  6 ++--
 include/QtCrypto/qca_keystore.h               |  4 +--
 include/QtCrypto/qca_publickey.h              | 14 ++++----
 include/QtCrypto/qca_safetimer.h              |  2 +-
 include/QtCrypto/qca_securelayer.h            |  8 ++---
 include/QtCrypto/qca_securemessage.h          |  4 +--
 include/QtCrypto/qca_support.h                | 14 ++++----
 include/QtCrypto/qpipe.h                      |  6 ++--
 plugins/qca-gnupg/gpgaction.h                 |  2 +-
 plugins/qca-gnupg/gpgop.h                     |  2 +-
 plugins/qca-gnupg/gpgproc/gpgproc.h           |  2 +-
 plugins/qca-gnupg/gpgproc/gpgproc_p.h         |  2 +-
 plugins/qca-gnupg/gpgproc/sprocess.h          |  2 +-
 plugins/qca-gnupg/ringwatch.h                 |  2 +-
 plugins/qca-ossl/qca-ossl.cpp                 |  8 ++---
 src/qca_cert.cpp                              |  2 +-
 src/qca_core.cpp                              |  4 +--
 src/qca_keystore.cpp                          |  4 +--
 src/qca_safeobj.h                             |  2 +-
 src/qca_safetimer.cpp                         |  2 +-
 src/support/console.cpp                       |  4 +--
 src/support/dirwatch.cpp                      |  2 +-
 src/support/qpipe.cpp                         | 12 +++----
 src/support/synchronizer.cpp                  |  2 +-
 src/support/syncthread.cpp                    |  2 +-
 unittest/pgpunittest/pgpunittest.cpp          |  2 +-
 32 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/examples/cmssigner/certitem.h b/examples/cmssigner/certitem.h
index c1ae785b..3eea1d75 100644
--- a/examples/cmssigner/certitem.h
+++ b/examples/cmssigner/certitem.h
@@ -82,7 +82,7 @@ public:
 		IconPgpSec
 	};
 
-	CertItemStore(QObject *parent = 0);
+	CertItemStore(QObject *parent = nullptr);
 	~CertItemStore();
 
 	int idFromRow(int row) const;
@@ -128,7 +128,7 @@ class CertItemPrivateLoader : public QObject
 {
 	Q_OBJECT
 public:
-	explicit CertItemPrivateLoader(CertItemStore *store, QObject *parent = 0);
+	explicit CertItemPrivateLoader(CertItemStore *store, QObject *parent = nullptr);
 	~CertItemPrivateLoader();
 
 	void start(int id);
diff --git a/examples/cmssigner/prompter.h b/examples/cmssigner/prompter.h
index daa9d907..04396bf3 100644
--- a/examples/cmssigner/prompter.h
+++ b/examples/cmssigner/prompter.h
@@ -34,7 +34,7 @@ class Prompter : public QObject
 {
 	Q_OBJECT
 public:
-	Prompter(QObject *parent = 0);
+	Prompter(QObject *parent = nullptr);
 	~Prompter();
 
 protected:
diff --git a/examples/eventhandlerdemo/eventhandlerdemo.cpp b/examples/eventhandlerdemo/eventhandlerdemo.cpp
index 0ff6cf13..013588cd 100644
--- a/examples/eventhandlerdemo/eventhandlerdemo.cpp
+++ b/examples/eventhandlerdemo/eventhandlerdemo.cpp
@@ -37,7 +37,7 @@ class ClientPassphraseHandler: public QObject
 {
     Q_OBJECT
 public:
-    ClientPassphraseHandler(QObject *parent = 0) : QObject( parent )
+    ClientPassphraseHandler(QObject *parent = nullptr) : QObject( parent )
     {
         // When the PasswordAsker or TokenAsker needs to interact
         // with the user, it raises a signal. We connect that to a
diff --git a/examples/keyloader/keyloader.cpp b/examples/keyloader/keyloader.cpp
index b9f90dc0..dcc05a8b 100644
--- a/examples/keyloader/keyloader.cpp
+++ b/examples/keyloader/keyloader.cpp
@@ -37,7 +37,7 @@ class PassphraseHandler: public QObject
 public:
 	QCA::EventHandler handler;
 
-	PassphraseHandler(QObject *parent = 0) : QObject(parent)
+	PassphraseHandler(QObject *parent = nullptr) : QObject(parent)
 	{
 		connect(&handler, SIGNAL(eventReady(int, const QCA::Event &)),
 			SLOT(eh_eventReady(int, const QCA::Event &)));
diff --git a/examples/tlssocket/tlssocket.h b/examples/tlssocket/tlssocket.h
index 5085f3d1..2f6a3ff7 100644
--- a/examples/tlssocket/tlssocket.h
+++ b/examples/tlssocket/tlssocket.h
@@ -27,7 +27,7 @@
 class TLSSocket : public QTcpSocket
 {
 public:
-	TLSSocket(QObject *parent = 0);
+	TLSSocket(QObject *parent = nullptr);
 	~TLSSocket();
 
 	void connectToHostEncrypted(const QString &host, quint16 port);
diff --git a/include/QtCrypto/qca_cert.h b/include/QtCrypto/qca_cert.h
index f78b3e11..29f70e43 100644
--- a/include/QtCrypto/qca_cert.h
+++ b/include/QtCrypto/qca_cert.h
@@ -1101,7 +1101,7 @@ CertificateInfoOrdered info = cert.subjectInfoOrdered();
 	   \return the Certificate corresponding to the certificate in the
 	   provided array
 	*/
-	static Certificate fromDER(const QByteArray &a, ConvertResult *result = 0, const QString &provider = QString());
+	static Certificate fromDER(const QByteArray &a, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the certificate from PEM format
@@ -1115,7 +1115,7 @@ CertificateInfoOrdered info = cert.subjectInfoOrdered();
 	   \return the Certificate corresponding to the certificate in the
 	   provided string
 	*/
-	static Certificate fromPEM(const QString &s, ConvertResult *result = 0, const QString &provider = QString());
+	static Certificate fromPEM(const QString &s, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the certificate from a file
@@ -1130,7 +1130,7 @@ CertificateInfoOrdered info = cert.subjectInfoOrdered();
 	   \return the Certificate corresponding to the certificate in the
 	   provided string
 	*/
-	static Certificate fromPEMFile(const QString &fileName, ConvertResult *result = 0, const QString &provider = QString());
+	static Certificate fromPEMFile(const QString &fileName, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Test if the subject of the certificate matches a specified host
@@ -1479,7 +1479,7 @@ public:
 
 	   \note this only applies to PKCS#10 format certificate requests
 	*/
-	static CertificateRequest fromDER(const QByteArray &a, ConvertResult *result = 0, const QString &provider = QString());
+	static CertificateRequest fromDER(const QByteArray &a, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the certificate request from PEM format
@@ -1496,7 +1496,7 @@ public:
 
 	   \note this only applies to PKCS#10 format certificate requests
 	*/
-	static CertificateRequest fromPEM(const QString &s, ConvertResult *result = 0, const QString &provider = QString());
+	static CertificateRequest fromPEM(const QString &s, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the certificate request from a file
@@ -1513,7 +1513,7 @@ public:
 
 	   \note this only applies to PKCS#10 format certificate requests
 	*/
-	static CertificateRequest fromPEMFile(const QString &fileName, ConvertResult *result = 0, const QString &provider = QString());
+	static CertificateRequest fromPEMFile(const QString &fileName, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Export the CertificateRequest to a string
@@ -1538,7 +1538,7 @@ public:
 
 	   \note this only applies to SPKAC format certificate requests
 	*/
-	static CertificateRequest fromString(const QString &s, ConvertResult *result = 0, const QString &provider = QString());
+	static CertificateRequest fromString(const QString &s, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   \internal
@@ -1832,7 +1832,7 @@ public:
 
 	   \return the CRL corresponding to the contents of the array
 	*/
-	static CRL fromDER(const QByteArray &a, ConvertResult *result = 0, const QString &provider = QString());
+	static CRL fromDER(const QByteArray &a, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import a PEM encoded %Certificate Revocation List (CRL)
@@ -1845,7 +1845,7 @@ public:
 
 	   \return the CRL corresponding to the contents of the string
 	*/
-	static CRL fromPEM(const QString &s, ConvertResult *result = 0, const QString &provider = QString());
+	static CRL fromPEM(const QString &s, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import a PEM encoded %Certificate Revocation List (CRL) from a file
@@ -1859,7 +1859,7 @@ public:
 
 	   \return the CRL in the file
 	*/
-	static CRL fromPEMFile(const QString &fileName, ConvertResult *result = 0, const QString &provider = QString());
+	static CRL fromPEMFile(const QString &fileName, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   \internal
@@ -2004,7 +2004,7 @@ public:
 	   \return the CertificateCollection corresponding to the contents of
 	   the file specified in fileName
 	*/
-	static CertificateCollection fromFlatTextFile(const QString &fileName, ConvertResult *result = 0, const QString &provider = QString());
+	static CertificateCollection fromFlatTextFile(const QString &fileName, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   import a CertificateCollection from a PKCS#7 file
@@ -2019,7 +2019,7 @@ public:
 	   \return the CertificateCollection corresponding to the contents of
 	   the file specified in fileName
 	*/
-	static CertificateCollection fromPKCS7File(const QString &fileName, ConvertResult *result = 0, const QString &provider = QString());
+	static CertificateCollection fromPKCS7File(const QString &fileName, ConvertResult *result = nullptr, const QString &provider = QString());
 
 private:
 	class Private;
@@ -2304,7 +2304,7 @@ else
 	   \note This synchronous operation may require event handling, and so
 	   it must not be called from the same thread as an EventHandler.
 	*/
-	static KeyBundle fromArray(const QByteArray &a, const SecureArray &passphrase = SecureArray(), ConvertResult *result = 0, const QString &provider = QString());
+	static KeyBundle fromArray(const QByteArray &a, const SecureArray &passphrase = SecureArray(), ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the key bundle from a file in PKCS12 (.p12) format
@@ -2336,7 +2336,7 @@ else
 	   \note This synchronous operation may require event handling, and so
 	   it must not be called from the same thread as an EventHandler.
 	*/
-	static KeyBundle fromFile(const QString &fileName, const SecureArray &passphrase = SecureArray(), ConvertResult *result = 0, const QString &provider = QString());
+	static KeyBundle fromFile(const QString &fileName, const SecureArray &passphrase = SecureArray(), ConvertResult *result = nullptr, const QString &provider = QString());
 
 private:
 	class Private;
@@ -2493,7 +2493,7 @@ public:
 	   \param provider the provider to use, if a particular provider is
 	   required
 	*/
-	static PGPKey fromArray(const QByteArray &a, ConvertResult *result = 0, const QString &provider = QString());
+	static PGPKey fromArray(const QByteArray &a, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the key from a string
@@ -2504,7 +2504,7 @@ public:
 	   \param provider the provider to use, if a particular provider is
 	   required
 	*/
-	static PGPKey fromString(const QString &s, ConvertResult *result = 0, const QString &provider = QString());
+	static PGPKey fromString(const QString &s, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the key from a file
@@ -2516,7 +2516,7 @@ public:
 	   \param provider the provider to use, if a particular provider is
 	   required
 	*/
-	static PGPKey fromFile(const QString &fileName, ConvertResult *result = 0, const QString &provider = QString());
+	static PGPKey fromFile(const QString &fileName, ConvertResult *result = nullptr, const QString &provider = QString());
 
 private:
 	class Private;
@@ -2571,7 +2571,7 @@ public:
 
 	   \param parent the parent object for this object
 	*/
-	KeyLoader(QObject *parent = 0);
+	KeyLoader(QObject *parent = nullptr);
 	~KeyLoader();
 
 	/**
diff --git a/include/QtCrypto/qca_core.h b/include/QtCrypto/qca_core.h
index 8c25a701..8c9e44b2 100644
--- a/include/QtCrypto/qca_core.h
+++ b/include/QtCrypto/qca_core.h
@@ -1566,7 +1566,7 @@ public:
 
 	   \param parent the parent object for this object
 	*/
-	EventHandler(QObject *parent = 0);
+	EventHandler(QObject *parent = nullptr);
 	~EventHandler();
 
 	/**
@@ -1648,7 +1648,7 @@ public:
 
 	   \param parent the parent object for this QObject
 	*/
-	PasswordAsker(QObject *parent = 0);
+	PasswordAsker(QObject *parent = nullptr);
 	~PasswordAsker();
 
 	/**
@@ -1740,7 +1740,7 @@ public:
 
 	   \param parent the parent object for this QObject
 	*/
-	TokenAsker(QObject *parent = 0);
+	TokenAsker(QObject *parent = nullptr);
 	~TokenAsker();
 
 	/**
diff --git a/include/QtCrypto/qca_keystore.h b/include/QtCrypto/qca_keystore.h
index 9fe279d4..8c6c5cef 100644
--- a/include/QtCrypto/qca_keystore.h
+++ b/include/QtCrypto/qca_keystore.h
@@ -361,7 +361,7 @@ public:
 	   \param e the KeyStoreEntry to monitor
 	   \param parent the parent object for this object
 	*/
-	explicit KeyStoreEntryWatcher(const KeyStoreEntry &e, QObject *parent = 0);
+	explicit KeyStoreEntryWatcher(const KeyStoreEntry &e, QObject *parent = nullptr);
 
 	~KeyStoreEntryWatcher();
 
@@ -715,7 +715,7 @@ public:
 
 	   \param parent the parent for this object
 	*/
-	KeyStoreManager(QObject *parent = 0);
+	KeyStoreManager(QObject *parent = nullptr);
 	~KeyStoreManager();
 
 	/**
diff --git a/include/QtCrypto/qca_publickey.h b/include/QtCrypto/qca_publickey.h
index 57b2292c..2ccb8ef7 100644
--- a/include/QtCrypto/qca_publickey.h
+++ b/include/QtCrypto/qca_publickey.h
@@ -743,7 +743,7 @@ if (! QCA::ConvertGood == conversionResult)
 	   conversion succeeded (ConvertGood) or not
 	   \param provider the name of the provider to use for the import.
 	*/
-	static PublicKey fromDER(const QByteArray &a, ConvertResult *result = 0, const QString &provider = QString());
+	static PublicKey fromDER(const QByteArray &a, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import a key in Privacy Enhanced Mail (PEM) format
@@ -770,7 +770,7 @@ if (! QCA::ConvertGood == conversionResult)
 	   \sa toPEM, which provides an inverse of fromPEM()
 	   \sa fromPEMFile, which provides an import direct from a file.
 	*/
-	static PublicKey fromPEM(const QString &s, ConvertResult *result = 0, const QString &provider = QString());
+	static PublicKey fromPEM(const QString &s, ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import a key in Privacy Enhanced Mail (PEM) format from a file
@@ -799,7 +799,7 @@ if (! QCA::ConvertGood == conversionResult)
 
 	   \note there is also a constructor form that can import from a file
 	*/
-	static PublicKey fromPEMFile(const QString &fileName, ConvertResult *result = 0, const QString &provider = QString());
+	static PublicKey fromPEMFile(const QString &fileName, ConvertResult *result = nullptr, const QString &provider = QString());
 
 protected:
 	/**
@@ -1045,7 +1045,7 @@ public:
 	   \note This synchronous operation may require event handling, and so
 	   it must not be called from the same thread as an EventHandler.
 	*/
-	static PrivateKey fromDER(const SecureArray &a, const SecureArray &passphrase = SecureArray(), ConvertResult *result = 0, const QString &provider = QString());
+	static PrivateKey fromDER(const SecureArray &a, const SecureArray &passphrase = SecureArray(), ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the key from Privacy Enhanced Mail (PEM) format
@@ -1065,7 +1065,7 @@ public:
 	   \note This synchronous operation may require event handling, and so
 	   it must not be called from the same thread as an EventHandler.
 	*/
-	static PrivateKey fromPEM(const QString &s, const SecureArray &passphrase = SecureArray(), ConvertResult *result = 0, const QString &provider = QString());
+	static PrivateKey fromPEM(const QString &s, const SecureArray &passphrase = SecureArray(), ConvertResult *result = nullptr, const QString &provider = QString());
 
 	/**
 	   Import the key in Privacy Enhanced Mail (PEM) format from a file
@@ -1089,7 +1089,7 @@ public:
 	   \note This synchronous operation may require event handling, and so
 	   it must not be called from the same thread as an EventHandler.
 	*/
-	static PrivateKey fromPEMFile(const QString &fileName, const SecureArray &passphrase = SecureArray(), ConvertResult *result = 0, const QString &provider = QString());
+	static PrivateKey fromPEMFile(const QString &fileName, const SecureArray &passphrase = SecureArray(), ConvertResult *result = nullptr, const QString &provider = QString());
 
 protected:
 	/**
@@ -1126,7 +1126,7 @@ public:
 
 	   \param parent the parent object, if applicable
 	*/
-	KeyGenerator(QObject *parent = 0);
+	KeyGenerator(QObject *parent = nullptr);
 
 	~KeyGenerator();
 
diff --git a/include/QtCrypto/qca_safetimer.h b/include/QtCrypto/qca_safetimer.h
index 65e469ff..327e8caa 100644
--- a/include/QtCrypto/qca_safetimer.h
+++ b/include/QtCrypto/qca_safetimer.h
@@ -34,7 +34,7 @@ class QCA_EXPORT SafeTimer : public QObject
 {
 	Q_OBJECT
 public:
-	SafeTimer(QObject *parent = 0);
+	SafeTimer(QObject *parent = nullptr);
 	~SafeTimer();
 
 	int interval() const;
diff --git a/include/QtCrypto/qca_securelayer.h b/include/QtCrypto/qca_securelayer.h
index 1858e19a..64bd436a 100644
--- a/include/QtCrypto/qca_securelayer.h
+++ b/include/QtCrypto/qca_securelayer.h
@@ -111,7 +111,7 @@ public:
 
 	   \param parent the parent object for this object
 	*/
-	SecureLayer(QObject *parent = 0);
+	SecureLayer(QObject *parent = nullptr);
 
 	/**
 	   Returns true if the layer has a meaningful "close".
@@ -345,7 +345,7 @@ public:
 	    \param provider the name of the provider, if a specific provider
 	    is required
 	*/
-	explicit TLS(QObject *parent = 0, const QString &provider = QString());
+	explicit TLS(QObject *parent = nullptr, const QString &provider = QString());
 
 	/**
 	   Constructor for Transport Layer Security connection.
@@ -358,7 +358,7 @@ public:
 	   \param provider the name of the provider, if a specific provider is
 	   required
 	*/
-	explicit TLS(Mode mode, QObject *parent = 0, const QString &provider = QString());
+	explicit TLS(Mode mode, QObject *parent = nullptr, const QString &provider = QString());
 
 	/**
 	   Destructor
@@ -969,7 +969,7 @@ public:
 	   specified, or specified as empty, then any provider is 
 	   acceptable.
 	*/
-	explicit SASL(QObject *parent = 0, const QString &provider = QString());
+	explicit SASL(QObject *parent = nullptr, const QString &provider = QString());
 
 	~SASL();
 
diff --git a/include/QtCrypto/qca_securemessage.h b/include/QtCrypto/qca_securemessage.h
index f8bbe3d9..0328a6ce 100644
--- a/include/QtCrypto/qca_securemessage.h
+++ b/include/QtCrypto/qca_securemessage.h
@@ -848,7 +848,7 @@ public:
 	   \param provider the provider to use, if a specific
 	   provider is required
 	*/
-	explicit OpenPGP(QObject *parent = 0, const QString &provider = QString());
+	explicit OpenPGP(QObject *parent = nullptr, const QString &provider = QString());
 	~OpenPGP();
 
 private:
@@ -894,7 +894,7 @@ public:
 	   \param provider the provider to use, if a specific
 	   provider is required
 	*/
-	explicit CMS(QObject *parent = 0, const QString &provider = QString());
+	explicit CMS(QObject *parent = nullptr, const QString &provider = QString());
 	~CMS();
 
 	/**
diff --git a/include/QtCrypto/qca_support.h b/include/QtCrypto/qca_support.h
index 9f8311d8..98f50c9a 100644
--- a/include/QtCrypto/qca_support.h
+++ b/include/QtCrypto/qca_support.h
@@ -278,7 +278,7 @@ public:
 
 	   \param parent the parent object for this parent.
 	*/
-	SyncThread(QObject *parent = 0);
+	SyncThread(QObject *parent = nullptr);
 
 	/**
 	   Calls stop() and then destructs
@@ -409,7 +409,7 @@ public:
 	   set in the constructor, you can set it using setDirName()
 	   \param parent the parent object for this object
 	*/
-	explicit DirWatch(const QString &dir = QString(), QObject *parent = 0);
+	explicit DirWatch(const QString &dir = QString(), QObject *parent = nullptr);
 	~DirWatch();
 
 	/**
@@ -467,7 +467,7 @@ public:
 	   in this object, you can set it using setFileName()
 	   \param parent the parent object for this object
 	*/
-	explicit FileWatch(const QString &file = QString(), QObject *parent = 0);
+	explicit FileWatch(const QString &file = QString(), QObject *parent = nullptr);
 	~FileWatch();
 
 	/**
@@ -596,7 +596,7 @@ public:
 	   you to test whether there is already a Console object of the 
 	   required Type, and if there is, obtain a reference to that object.
 	*/
-	Console(Type type, ChannelMode cmode, TerminalMode tmode, QObject *parent = 0);
+	Console(Type type, ChannelMode cmode, TerminalMode tmode, QObject *parent = nullptr);
 	~Console();
 
 	/**
@@ -699,7 +699,7 @@ public:
 
 	   \param parent the parent object for this object
 	*/
-	ConsoleReference(QObject *parent = 0);
+	ConsoleReference(QObject *parent = nullptr);
 	~ConsoleReference();
 
 	/**
@@ -861,7 +861,7 @@ public:
 
 	   \param parent the parent object for this object
 	*/
-	ConsolePrompt(QObject *parent = 0);
+	ConsolePrompt(QObject *parent = nullptr);
 	~ConsolePrompt();
 
 	/**
@@ -1093,7 +1093,7 @@ protected:
 	   \param name the name of this log device
 	   \param parent the parent for this logger
 	*/
-	explicit AbstractLogDevice(const QString &name, QObject *parent = 0);
+	explicit AbstractLogDevice(const QString &name, QObject *parent = nullptr);
 
 	virtual ~AbstractLogDevice() = 0;
 
diff --git a/include/QtCrypto/qpipe.h b/include/QtCrypto/qpipe.h
index 1d896443..c6fb63df 100644
--- a/include/QtCrypto/qpipe.h
+++ b/include/QtCrypto/qpipe.h
@@ -90,7 +90,7 @@ public:
 
 	   \param parent the parent object to this object
 	*/
-	QPipeDevice(QObject *parent = 0);
+	QPipeDevice(QObject *parent = nullptr);
 	~QPipeDevice();
 
 	/**
@@ -234,7 +234,7 @@ public:
 
 	   \param parent the parent object for this object
 	*/
-	QPipeEnd(QObject *parent = 0);
+	QPipeEnd(QObject *parent = nullptr);
 
 	~QPipeEnd();
 
@@ -487,7 +487,7 @@ public:
 
 	   \param parent the parent object for this object
 	*/
-	QPipe(QObject *parent = 0);
+	QPipe(QObject *parent = nullptr);
 
 	~QPipe();
 
diff --git a/plugins/qca-gnupg/gpgaction.h b/plugins/qca-gnupg/gpgaction.h
index d29109ad..ec907ce6 100644
--- a/plugins/qca-gnupg/gpgaction.h
+++ b/plugins/qca-gnupg/gpgaction.h
@@ -72,7 +72,7 @@ public:
 	Input input;
 	Output output;
 
-	GpgAction(QObject *parent = 0);
+	GpgAction(QObject *parent = nullptr);
 	~GpgAction();
 	void reset();
 	void start();
diff --git a/plugins/qca-gnupg/gpgop.h b/plugins/qca-gnupg/gpgop.h
index 7b11c6ea..5b5d1605 100644
--- a/plugins/qca-gnupg/gpgop.h
+++ b/plugins/qca-gnupg/gpgop.h
@@ -134,7 +134,7 @@ public:
 	};
 	typedef QList<Key> KeyList;
 
-	explicit GpgOp(const QString &bin, QObject *parent = 0);
+	explicit GpgOp(const QString &bin, QObject *parent = nullptr);
 	~GpgOp();
 
 	void reset();
diff --git a/plugins/qca-gnupg/gpgproc/gpgproc.h b/plugins/qca-gnupg/gpgproc/gpgproc.h
index a9f38c34..3782d522 100644
--- a/plugins/qca-gnupg/gpgproc/gpgproc.h
+++ b/plugins/qca-gnupg/gpgproc/gpgproc.h
@@ -34,7 +34,7 @@ class GPGProc : public QObject
 public:
 	enum Error { FailedToStart, UnexpectedExit, ErrorWrite };
 	enum Mode { NormalMode, ExtendedMode };
-	GPGProc(QObject *parent = 0);
+	GPGProc(QObject *parent = nullptr);
 	~GPGProc();
 
 	void reset();
diff --git a/plugins/qca-gnupg/gpgproc/gpgproc_p.h b/plugins/qca-gnupg/gpgproc/gpgproc_p.h
index 882054b2..55ffd48e 100644
--- a/plugins/qca-gnupg/gpgproc/gpgproc_p.h
+++ b/plugins/qca-gnupg/gpgproc/gpgproc_p.h
@@ -32,7 +32,7 @@ class QProcessSignalRelay : public QObject
 {
 	Q_OBJECT
 public:
-	QProcessSignalRelay(QProcess *proc, QObject *parent = 0)
+	QProcessSignalRelay(QProcess *proc, QObject *parent = nullptr)
 	:QObject(parent)
 	{
 		qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
diff --git a/plugins/qca-gnupg/gpgproc/sprocess.h b/plugins/qca-gnupg/gpgproc/sprocess.h
index 049cdb2b..517ea879 100644
--- a/plugins/qca-gnupg/gpgproc/sprocess.h
+++ b/plugins/qca-gnupg/gpgproc/sprocess.h
@@ -28,7 +28,7 @@ class SProcess : public QProcess
 {
 	Q_OBJECT
 public:
-	SProcess(QObject *parent = 0);
+	SProcess(QObject *parent = nullptr);
 	~SProcess();
 
 #ifdef Q_OS_UNIX
diff --git a/plugins/qca-gnupg/ringwatch.h b/plugins/qca-gnupg/ringwatch.h
index cb3fa342..5d1666d6 100644
--- a/plugins/qca-gnupg/ringwatch.h
+++ b/plugins/qca-gnupg/ringwatch.h
@@ -57,7 +57,7 @@ public:
 	QList<DirItem> dirs;
 	QList<FileItem> files;
 
-	RingWatch(QObject *parent = 0);
+	RingWatch(QObject *parent = nullptr);
 	~RingWatch();
 
 	void add(const QString &filePath);
diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp
index a5754225..c8e32a40 100644
--- a/plugins/qca-ossl/qca-ossl.cpp
+++ b/plugins/qca-ossl/qca-ossl.cpp
@@ -1897,7 +1897,7 @@ public:
 	RSA *result;
 	int bits, exp;
 
-	RSAKeyMaker(int _bits, int _exp, QObject *parent = 0) : QThread(parent), result(0), bits(_bits), exp(_exp)
+	RSAKeyMaker(int _bits, int _exp, QObject *parent = nullptr) : QThread(parent), result(0), bits(_bits), exp(_exp)
 	{
 	}
 
@@ -2296,7 +2296,7 @@ public:
 	DLGroup domain;
 	DSA *result;
 
-	DSAKeyMaker(const DLGroup &_domain, QObject *parent = 0) : QThread(parent), domain(_domain), result(0)
+	DSAKeyMaker(const DLGroup &_domain, QObject *parent = nullptr) : QThread(parent), domain(_domain), result(0)
 	{
 	}
 
@@ -2580,7 +2580,7 @@ public:
 	DLGroup domain;
 	DH *result;
 
-	DHKeyMaker(const DLGroup &_domain, QObject *parent = 0) : QThread(parent), domain(_domain), result(0)
+	DHKeyMaker(const DLGroup &_domain, QObject *parent = nullptr) : QThread(parent), domain(_domain), result(0)
 	{
 	}
 
@@ -6417,7 +6417,7 @@ public:
 	bool ok;
 	QByteArray out, sig;
 
-	MyMessageContextThread(QObject *parent = 0) : QThread(parent), ok(false)
+	MyMessageContextThread(QObject *parent = nullptr) : QThread(parent), ok(false)
 	{
 	}
 
diff --git a/src/qca_cert.cpp b/src/qca_cert.cpp
index 20af1407..099874d1 100644
--- a/src/qca_cert.cpp
+++ b/src/qca_cert.cpp
@@ -2832,7 +2832,7 @@ public:
 	In in;
 	Out out;
 
-	KeyLoaderThread(QObject *parent = 0) : QThread(parent)
+	KeyLoaderThread(QObject *parent = nullptr) : QThread(parent)
 	{
 	}
 
diff --git a/src/qca_core.cpp b/src/qca_core.cpp
index 0973d69b..cb5fee9e 100644
--- a/src/qca_core.cpp
+++ b/src/qca_core.cpp
@@ -1663,7 +1663,7 @@ class HandlerBase : public QObject
 {
 	Q_OBJECT
 public:
-	HandlerBase(QObject *parent = 0) : QObject(parent)
+	HandlerBase(QObject *parent = nullptr) : QObject(parent)
 	{
 	}
 
@@ -1675,7 +1675,7 @@ class AskerBase : public QObject
 {
 	Q_OBJECT
 public:
-	AskerBase(QObject *parent = 0) : QObject(parent)
+	AskerBase(QObject *parent = nullptr) : QObject(parent)
 	{
 	}
 
diff --git a/src/qca_keystore.cpp b/src/qca_keystore.cpp
index 0839d8fb..38cd670f 100644
--- a/src/qca_keystore.cpp
+++ b/src/qca_keystore.cpp
@@ -600,7 +600,7 @@ public:
 	KeyStoreTracker *tracker;
 	QMutex call_mutex;
 
-	KeyStoreThread(QObject *parent = 0) : SyncThread(parent)
+	KeyStoreThread(QObject *parent = nullptr) : SyncThread(parent)
 	{
 	}
 
@@ -971,7 +971,7 @@ public:
 	QString entryId; // in: RemoveEntry, out: WriteEntry
 	bool success; // out: RemoveEntry
 
-	KeyStoreOperation(QObject *parent = 0)
+	KeyStoreOperation(QObject *parent = nullptr)
 	:QThread(parent)
 	{
 	}
diff --git a/src/qca_safeobj.h b/src/qca_safeobj.h
index 0d7efdad..f4491e59 100644
--- a/src/qca_safeobj.h
+++ b/src/qca_safeobj.h
@@ -34,7 +34,7 @@ class SafeSocketNotifier : public QObject
 	Q_OBJECT
 public:
 	SafeSocketNotifier(int socket, QSocketNotifier::Type type,
-		QObject *parent = 0);
+		QObject *parent = nullptr);
 
 	~SafeSocketNotifier();
 
diff --git a/src/qca_safetimer.cpp b/src/qca_safetimer.cpp
index 53ad0332..704612bf 100644
--- a/src/qca_safetimer.cpp
+++ b/src/qca_safetimer.cpp
@@ -39,7 +39,7 @@ class SafeTimer::Private : public QObject
 	friend class SafeTimer;
 
 public:
-	Private(QObject *parent = 0);
+	Private(QObject *parent = nullptr);
 
 	int timerId;
 	int fixerTimerId;
diff --git a/src/support/console.cpp b/src/support/console.cpp
index 277cf4e6..0fcc7929 100644
--- a/src/support/console.cpp
+++ b/src/support/console.cpp
@@ -60,7 +60,7 @@ private:
 	QByteArray in_left, out_left;
 
 public:
-	ConsoleWorker(QObject *parent = 0) : QObject(parent), in(this), out(this)
+	ConsoleWorker(QObject *parent = nullptr) : QObject(parent), in(this), out(this)
 	{
 		started = false;
 	}
@@ -219,7 +219,7 @@ public:
 	QByteArray in_left, out_left;
 	QMutex call_mutex;
 
-	ConsoleThread(QObject *parent = 0) : SyncThread(parent)
+	ConsoleThread(QObject *parent = nullptr) : SyncThread(parent)
 	{
 		qRegisterMetaType<SecureArray>("QCA::SecureArray");
 	}
diff --git a/src/support/dirwatch.cpp b/src/support/dirwatch.cpp
index ad47bfc4..cbc8aa9a 100644
--- a/src/support/dirwatch.cpp
+++ b/src/support/dirwatch.cpp
@@ -37,7 +37,7 @@ class QFileSystemWatcherRelay : public QObject
 public:
 	QFileSystemWatcher *watcher;
 
-	QFileSystemWatcherRelay(QFileSystemWatcher *_watcher, QObject *parent = 0)
+	QFileSystemWatcherRelay(QFileSystemWatcher *_watcher, QObject *parent = nullptr)
 	:QObject(parent), watcher(_watcher)
 	{
 		connect(watcher, SIGNAL(directoryChanged(const QString &)), SIGNAL(directoryChanged(const QString &)), Qt::QueuedConnection);
diff --git a/src/support/qpipe.cpp b/src/support/qpipe.cpp
index afeff9c8..2d361959 100644
--- a/src/support/qpipe.cpp
+++ b/src/support/qpipe.cpp
@@ -419,7 +419,7 @@ class QPipeWriter : public QThread
 {
 	Q_OBJECT
 public:
-	QPipeWriter(QObject *parent = 0) : QThread(parent)
+	QPipeWriter(QObject *parent = nullptr) : QThread(parent)
 	{
 	}
 
@@ -456,7 +456,7 @@ class QPipeReader : public QThread
 {
 	Q_OBJECT
 public:
-	QPipeReader(QObject *parent = 0) : QThread(parent)
+	QPipeReader(QObject *parent = nullptr) : QThread(parent)
 	{
 	}
 
@@ -499,7 +499,7 @@ public:
 	const char *data;
 	int size;
 
-	QPipeWriterThread(Q_PIPE_ID id, QObject *parent = 0) : QPipeWriter(parent)
+	QPipeWriterThread(Q_PIPE_ID id, QObject *parent = nullptr) : QPipeWriter(parent)
 	{
 		do_quit = false;
 		data = 0;
@@ -634,7 +634,7 @@ public:
 	SafeTimer timer;
 	int total;
 
-	QPipeWriterPoll(Q_PIPE_ID id, QObject *parent = 0) : QPipeWriter(parent), timer(this)
+	QPipeWriterPoll(Q_PIPE_ID id, QObject *parent = nullptr) : QPipeWriter(parent), timer(this)
 	{
 		pipe = id;
 		data = 0;
@@ -708,7 +708,7 @@ public:
 	QWaitCondition w;
 	bool do_quit, active;
 
-	QPipeReaderThread(Q_PIPE_ID id, QObject *parent = 0) : QPipeReader(parent)
+	QPipeReaderThread(Q_PIPE_ID id, QObject *parent = nullptr) : QPipeReader(parent)
 	{
 		do_quit = false;
 		active = true;
@@ -807,7 +807,7 @@ public:
 	SafeTimer timer;
 	bool consoleMode;
 
-	QPipeReaderPoll(Q_PIPE_ID id, QObject *parent = 0) : QPipeReader(parent), timer(this)
+	QPipeReaderPoll(Q_PIPE_ID id, QObject *parent = nullptr) : QPipeReader(parent), timer(this)
 	{
 		pipe = id;
 		connect(&timer, SIGNAL(timeout()), SLOT(tryRead()));
diff --git a/src/support/synchronizer.cpp b/src/support/synchronizer.cpp
index 34bd671d..6105f703 100644
--- a/src/support/synchronizer.cpp
+++ b/src/support/synchronizer.cpp
@@ -317,7 +317,7 @@ class SynchronizerAgent : public QObject
 {
 	Q_OBJECT
 public:
-	SynchronizerAgent(QObject *parent = 0) : QObject(parent)
+	SynchronizerAgent(QObject *parent = nullptr) : QObject(parent)
 	{
 		QMetaObject::invokeMethod(this, "started", Qt::QueuedConnection);
 	}
diff --git a/src/support/syncthread.cpp b/src/support/syncthread.cpp
index 2f964f8d..80ab0117 100644
--- a/src/support/syncthread.cpp
+++ b/src/support/syncthread.cpp
@@ -120,7 +120,7 @@ class SyncThreadAgent : public QObject
 {
 	Q_OBJECT
 public:
-	SyncThreadAgent(QObject *parent = 0) : QObject(parent)
+	SyncThreadAgent(QObject *parent = nullptr) : QObject(parent)
 	{
 		QMetaObject::invokeMethod(this, "started", Qt::QueuedConnection);
 	}
diff --git a/unittest/pgpunittest/pgpunittest.cpp b/unittest/pgpunittest/pgpunittest.cpp
index 0551579d..6fa043b5 100644
--- a/unittest/pgpunittest/pgpunittest.cpp
+++ b/unittest/pgpunittest/pgpunittest.cpp
@@ -64,7 +64,7 @@ class PGPPassphraseProvider: public QObject
 {
     Q_OBJECT
 public:
-    PGPPassphraseProvider(QObject *parent = 0) : QObject(parent)
+    PGPPassphraseProvider(QObject *parent = nullptr) : QObject(parent)
     {
         connect(&m_handler, SIGNAL(eventReady(int, const QCA::Event &)),
 		SLOT(eh_eventReady(int, const QCA::Event &)));