Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c69b27a8 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Use nullptr

parent 87934266
......@@ -35,7 +35,7 @@ class QShowEvent;
class EmoticonItem : public QListWidgetItem
{
public:
EmoticonItem(const QString &emoticonText, const QString &pixmapPath, QListWidget *parent = 0);
EmoticonItem(const QString &emoticonText, const QString &pixmapPath, QListWidget *parent = nullptr);
// ~EmoticonLabel();
QString text() const;
......
......@@ -23,7 +23,7 @@
class StatusTreeView : public QTreeView
{
public:
StatusTreeView(QWidget *parent = 0) : QTreeView(parent)
StatusTreeView(QWidget *parent = nullptr) : QTreeView(parent)
{
}
......
......@@ -39,7 +39,7 @@ public:
* The parameter @p parent is handled by
* QTreeWidget.
*/
AccountSelector(QWidget *parent = 0);
AccountSelector(QWidget *parent = nullptr);
/**
* Constructor for a list of accounts for one protocol only
......@@ -48,7 +48,7 @@ public:
* QTreeWidget. @p proto defines the protocol whose accounts are
* shown in the list
*/
explicit AccountSelector(Kopete::Protocol *proto, QWidget *parent = 0);
explicit AccountSelector(Kopete::Protocol *proto, QWidget *parent = nullptr);
/**
* Destructor.
......
......@@ -35,7 +35,7 @@ class LIBKOPETE_EXPORT AddContactPage : public QWidget
Q_OBJECT
public:
AddContactPage(QWidget *parent = 0);
AddContactPage(QWidget *parent = nullptr);
virtual ~AddContactPage();
//Kopete::Protocol *protocol;
......
......@@ -34,7 +34,7 @@ class CryptographyGUIClient : public QObject, public KXMLGUIClient
{
Q_OBJECT
public:
explicit CryptographyGUIClient (Kopete::ChatSession *parent = 0);
explicit CryptographyGUIClient (Kopete::ChatSession *parent = nullptr);
~CryptographyGUIClient();
bool signing()
......
......@@ -40,7 +40,7 @@ class CryptographyPreferences : public KCModule
Q_OBJECT
public:
explicit CryptographyPreferences (QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit CryptographyPreferences (QWidget *parent = nullptr, const QVariantList &args = QVariantList());
virtual ~CryptographyPreferences();
virtual void save();
virtual void load();
......
......@@ -37,7 +37,7 @@ class ExportKeys : public KDialog
{
Q_OBJECT
public:
explicit ExportKeys (QList<Kopete::MetaContact *> mcs, QWidget *parent = 0);
explicit ExportKeys (QList<Kopete::MetaContact *> mcs, QWidget *parent = nullptr);
~ExportKeys();
......
......@@ -36,7 +36,7 @@ class NowListeningPreferences : public KCModule
{
Q_OBJECT
public:
explicit NowListeningPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit NowListeningPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
virtual ~NowListeningPreferences();
virtual void save();
virtual void load();
......
......@@ -43,7 +43,7 @@ class AuthenticationWizard : public QWizard
{
Q_OBJECT
public:
explicit AuthenticationWizard(QWidget *parent = 0, ConnContext *context = 0, Kopete::ChatSession *session = 0, bool initiate = true, const QString &question = QString());
explicit AuthenticationWizard(QWidget *parent = nullptr, ConnContext *context = 0, Kopete::ChatSession *session = 0, bool initiate = true, const QString &question = QString());
~AuthenticationWizard();
static AuthenticationWizard *findWizard(Kopete::ChatSession *session);
......
......@@ -36,7 +36,7 @@ class OTRPreferences : public KCModule
Q_OBJECT
public:
explicit OTRPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit OTRPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~OTRPreferences();
private:
......
......@@ -34,7 +34,7 @@ class PrivKeyPopup : public KDialog
{
Q_OBJECT
public:
PrivKeyPopup(QWidget *parent = 0);
PrivKeyPopup(QWidget *parent = nullptr);
~PrivKeyPopup();
void setCloseLock(bool locked);
......
......@@ -34,7 +34,7 @@ public:
AllowAllMessages, AllowNoMessagesExceptWhiteList, AllowAllMessagesExceptBlackList
};
explicit PrivacyPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit PrivacyPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~PrivacyPreferences();
void save() Q_DECL_OVERRIDE;
......
......@@ -44,7 +44,7 @@ class StatisticsDialog : public KDialog
public:
typedef QPair<QDate, QString> StatusPair;
StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, QWidget *parent = 0);
StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, QWidget *parent = nullptr);
~StatisticsDialog();
QSize sizeHint() const Q_DECL_OVERRIDE
......
......@@ -33,7 +33,7 @@ class TranslatorDialog : public KDialog
Q_OBJECT
public:
explicit TranslatorDialog(const QString &translated, QWidget *parent = 0);
explicit TranslatorDialog(const QString &translated, QWidget *parent = nullptr);
~TranslatorDialog();
QString translatedText();
......
......@@ -35,7 +35,7 @@ class TranslatorPreferences : public KCModule
{
Q_OBJECT
public:
explicit TranslatorPreferences(QWidget *parent = 0, const QVariantList &args = QVariantList());
explicit TranslatorPreferences(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
~TranslatorPreferences();
virtual void save();
......
......@@ -36,7 +36,7 @@ class KNetworkByteStream : public ByteStream
Q_OBJECT
public:
KNetworkByteStream ( QObject *parent = 0 );
KNetworkByteStream ( QObject *parent = nullptr );
~KNetworkByteStream ();
......
......@@ -36,7 +36,7 @@ class KNetworkConnector : public Connector
Q_OBJECT
public:
KNetworkConnector ( QObject *parent = 0 );
KNetworkConnector ( QObject *parent = nullptr );
virtual ~KNetworkConnector ();
......
......@@ -35,7 +35,7 @@ public:
enum Error {
ErrRead, ErrWrite, ErrCustom = 10
};
ByteStream(QObject *parent = 0);
ByteStream(QObject *parent = nullptr);
virtual ~ByteStream() = 0;
virtual bool isOpen() const;
......
......@@ -50,7 +50,7 @@ Q_OBJECT
EXTERNAL API
*************/
explicit Client( QObject *parent = 0, uint protocolVersion = 2 );
explicit Client( QObject *parent = nullptr, uint protocolVersion = 2 );
~Client();
void setOSName( const QString &name );
void setClientName( const QString &s );
......
......@@ -31,7 +31,7 @@ class LIBGROUPWISE_EXPORT Connector : public QObject
{
Q_OBJECT
public:
Connector(QObject *parent = 0);
Connector(QObject *parent = nullptr);
virtual ~Connector();
virtual void connectToServer(const QString &server) = 0;
......
......@@ -110,7 +110,7 @@ class EventProtocol : public InputProtocolBase
{
Q_OBJECT
public:
EventProtocol(QObject *parent = 0);
EventProtocol(QObject *parent = nullptr);
~EventProtocol();
/**
* Attempt to parse the supplied data into an @ref EventTransfer object.
......
......@@ -88,7 +88,7 @@ public:
BindConflict // resource in-use
};
explicit ClientStream(Connector *conn, TLSHandler *tlsHandler = 0, QObject *parent = 0);
explicit ClientStream(Connector *conn, TLSHandler *tlsHandler = 0, QObject *parent = nullptr);
~ClientStream();
void connectToServer(const NovellDN &id, bool auth = true);
......
......@@ -36,7 +36,7 @@ public:
enum EventProtocolState {
Success, NeedMore, OutOfSync, ProtocolError
};
InputProtocolBase(QObject *parent = 0);
InputProtocolBase(QObject *parent = nullptr);
~InputProtocolBase();
/**
......
......@@ -46,7 +46,7 @@ public:
SystemShutdown
};
Stream(QObject *parent = 0);
Stream(QObject *parent = nullptr);
virtual ~Stream();
virtual void close() = 0;
......
......@@ -32,7 +32,7 @@ class TLSHandler : public QObject
{
Q_OBJECT
public:
TLSHandler(QObject *parent = 0);
TLSHandler(QObject *parent = nullptr);
virtual ~TLSHandler();
virtual void reset() = 0;
......
......@@ -45,7 +45,7 @@ public:
/**
* Display properties given a GroupWise::ContactDetails
*/
explicit GroupWiseContactProperties( GroupWise::ContactDetails contactDetails, QWidget *parent = 0 );
explicit GroupWiseContactProperties( GroupWise::ContactDetails contactDetails, QWidget *parent = nullptr );
~GroupWiseContactProperties();
protected:
void setupProperties( QMap< QString, QVariant > serverProps );
......
......@@ -38,7 +38,7 @@ class GroupWiseContactSearch : public QWidget, public Ui::GroupWiseContactSearch
Q_OBJECT
public:
GroupWiseContactSearch( GroupWiseAccount * account, QAbstractItemView::SelectionMode mode, bool onlineOnly,
QWidget *parent = 0 );
QWidget *parent = nullptr );
virtual ~GroupWiseContactSearch();
QList< GroupWise::ContactDetails > selectedResults();
Q_SIGNALS:
......
......@@ -34,7 +34,7 @@ class JabberJingleContent : public QObject
{
Q_OBJECT
public:
JabberJingleContent(JabberJingleSession *parent = 0, XMPP::JingleContent *c = 0);
JabberJingleContent(JabberJingleSession *parent = nullptr, XMPP::JingleContent *c = 0);
~JabberJingleContent();
void setContent(XMPP::JingleContent *);
......
......@@ -57,7 +57,7 @@ class TreeItem;
class JingleCallsModel : public QAbstractItemModel
{
public:
JingleCallsModel(const QList<JabberJingleSession *> &, QObject *parent = 0);
JingleCallsModel(const QList<JabberJingleSession *> &, QObject *parent = nullptr);
~JingleCallsModel();
QModelIndex index(int, int, const QModelIndex &parent = QModelIndex()) const;
......@@ -86,7 +86,7 @@ private:
class TreeItem
{
public:
TreeItem(const QVector<QVariant> &data, TreeItem *parent = 0);
TreeItem(const QVector<QVariant> &data, TreeItem *parent = nullptr);
~TreeItem();
void appendChild(TreeItem *child);
......
......@@ -31,7 +31,7 @@ class JingleContentDialog : public QDialog
{
Q_OBJECT
public:
JingleContentDialog(QWidget *parent = 0);
JingleContentDialog(QWidget *parent = nullptr);
~JingleContentDialog();
void setContents(QList<XMPP::JingleContent *> c);
void setSession(XMPP::JingleSession *s);
......
......@@ -116,7 +116,7 @@ public:
QByteArray domain;
};
QDnsSd(QObject *parent = 0);
QDnsSd(QObject *parent = nullptr);
~QDnsSd();
int query(const QByteArray &name, int qType);
......
......@@ -36,7 +36,7 @@ public:
ErrorGeneric
};
AddressResolver(QObject *parent = 0);
AddressResolver(QObject *parent = nullptr);
~AddressResolver();
void start(const QByteArray &hostName);
......
......@@ -59,7 +59,7 @@ public:
QHostAddress gateway;
};
NetInterfaceProvider(QObject *parent = 0) :
NetInterfaceProvider(QObject *parent = nullptr) :
QObject(parent)
{
}
......@@ -78,7 +78,7 @@ class IRISNET_EXPORT NetAvailabilityProvider : public QObject
Q_OBJECT
public:
NetAvailabilityProvider(QObject *parent = 0) :
NetAvailabilityProvider(QObject *parent = nullptr) :
QObject(parent)
{
}
......@@ -97,7 +97,7 @@ class IRISNET_EXPORT NameProvider : public QObject
Q_OBJECT
public:
NameProvider(QObject *parent = 0) :
NameProvider(QObject *parent = nullptr) :
QObject(parent)
{
}
......@@ -135,7 +135,7 @@ public:
QByteArray hostName; // optional
};
ServiceProvider(QObject *parent = 0) :
ServiceProvider(QObject *parent = nullptr) :
QObject(parent)
{
}
......
......@@ -30,7 +30,7 @@ class NetAvailability : public QObject
Q_OBJECT
public:
NetAvailability(QObject *parent = 0);
NetAvailability(QObject *parent = nullptr);
~NetAvailability();
bool isAvailable() const;
......
......@@ -157,7 +157,7 @@ public:
/**
\brief Constructs a new manager object with the given \a parent
*/
NetInterfaceManager(QObject *parent = 0);
NetInterfaceManager(QObject *parent = nullptr);
/**
\brief Destroys the manager object
......
......@@ -704,7 +704,7 @@ public:
QHash<int,ServiceResolver::Private*> sres_instances;
QHash<int,ServiceLocalPublisher::Private*> slp_instances;
NameManager(QObject *parent = 0) : QObject(parent)
NameManager(QObject *parent = nullptr) : QObject(parent)
{
p_net = 0;
p_local = 0;
......
......@@ -423,7 +423,7 @@ public:
/**
\brief Constructs a new resolver object with the given \a parent
*/
NameResolver(QObject *parent = 0);
NameResolver(QObject *parent = nullptr);
/**
\brief Destroys the resolver object
......@@ -525,7 +525,7 @@ public:
ErrorNoWide
};
ServiceBrowser(QObject *parent = 0);
ServiceBrowser(QObject *parent = nullptr);
~ServiceBrowser();
void start(const QString &type, const QString &domain = "local");
......@@ -591,7 +591,7 @@ public:
* Create a new ServiceResolver.
* This resolver can be used for multiple lookups in a row, but not concurrently!
*/
ServiceResolver(QObject *parent = 0);
ServiceResolver(QObject *parent = nullptr);
~ServiceResolver();
Protocol protocol() const; //!< IP protocol to use, defaults to IPv6_IPv4
......@@ -677,7 +677,7 @@ public:
ErrorNoLocal // unable to setup multicast dns
};
ServiceLocalPublisher(QObject *parent = 0);
ServiceLocalPublisher(QObject *parent = nullptr);
~ServiceLocalPublisher();
void publish(const QString &instance, const QString &type, int port, const QMap<QString,QByteArray> &attributes);
......
......@@ -461,7 +461,7 @@ public:
NameResolver::Error error;
NameResolver::Error localError;
Item(QObject *parent = 0) :
Item(QObject *parent = nullptr) :
id(-1),
req(0),
sess(parent),
......@@ -477,7 +477,7 @@ public:
};
QList<Item*> items;
static JDnsNameProvider *create(JDnsGlobal *global, Mode mode, QObject *parent = 0)
static JDnsNameProvider *create(JDnsGlobal *global, Mode mode, QObject *parent = nullptr)
{
if(mode == Internet)
{
......@@ -493,7 +493,7 @@ public:
return new JDnsNameProvider(global, mode, parent);
}
JDnsNameProvider(JDnsGlobal *_global, Mode _mode, QObject *parent = 0) :
JDnsNameProvider(JDnsGlobal *_global, Mode _mode, QObject *parent = nullptr) :
NameProvider(parent)
{
global = _global;
......@@ -816,7 +816,7 @@ public:
QByteArray type, typeAndDomain;
QJDnsSharedRequest req;
JDnsBrowse(QJDnsShared *_jdns, QObject *parent = 0) :
JDnsBrowse(QJDnsShared *_jdns, QObject *parent = nullptr) :
QObject(parent),
req(_jdns, this)
{
......@@ -915,7 +915,7 @@ public:
bool have4, have6;
QHostAddress addr4, addr6;
JDnsServiceResolve(QJDnsShared *_jdns, QObject *parent = 0) :
JDnsServiceResolve(QJDnsShared *_jdns, QObject *parent = nullptr) :
QObject(parent),
reqtxt(_jdns, this),
req(_jdns, this),
......@@ -1137,7 +1137,7 @@ public:
QJDnsSharedRequest pub_ptr;
bool success_;
JDnsPublishAddress(QJDnsShared *_jdns, QObject *parent = 0) :
JDnsPublishAddress(QJDnsShared *_jdns, QObject *parent = nullptr) :
QObject(parent),
pub_addr(_jdns, this),
pub_ptr(_jdns, this)
......@@ -1244,7 +1244,7 @@ public:
bool have6, have4;
ObjectSession sess;
JDnsPublishAddresses(QJDnsShared *_jdns, QObject *parent = 0) :
JDnsPublishAddresses(QJDnsShared *_jdns, QObject *parent = nullptr) :
QObject(parent),
started(false),
use6(false),
......@@ -1528,7 +1528,7 @@ public:
QSet<JDnsPublishExtra*> extraList;
JDnsPublish(QJDnsShared *_jdns, QObject *parent = 0) :
JDnsPublish(QJDnsShared *_jdns, QObject *parent = nullptr) :
QObject(parent),
jdns(_jdns),
pub_srv(_jdns, this),
......@@ -2193,12 +2193,12 @@ public:
PublishItemList publishItemList;
PublishExtraItemList publishExtraItemList;
static JDnsServiceProvider *create(JDnsGlobal *global, QObject *parent = 0)
static JDnsServiceProvider *create(JDnsGlobal *global, QObject *parent = nullptr)
{
return new JDnsServiceProvider(global, parent);
}
JDnsServiceProvider(JDnsGlobal *_global, QObject *parent = 0) :
JDnsServiceProvider(JDnsGlobal *_global, QObject *parent = nullptr) :
ServiceProvider(parent),
pub_addresses(0)
{
......
......@@ -32,7 +32,7 @@ class ObjectSession : public QObject
Q_OBJECT
public:
ObjectSession(QObject *parent = 0);
ObjectSession(QObject *parent = nullptr);
~ObjectSession();
// clear all deferred requests, invalidate watchers
......
......@@ -44,7 +44,7 @@ class QTcpSocketSignalRelay : public QObject
{
Q_OBJECT
public:
QTcpSocketSignalRelay(QTcpSocket *sock, QObject *parent = 0)
QTcpSocketSignalRelay(QTcpSocket *sock, QObject *parent = nullptr)
:QObject(parent)
{
qRegisterMetaType<QAbstractSocket::SocketError>("QAbstractSocket::SocketError");
......
......@@ -107,7 +107,7 @@ public:
}
};
Ice176(QObject *parent = 0);
Ice176(QObject *parent = nullptr);
~Ice176();
void reset();
......
......@@ -443,7 +443,7 @@ private:
return calc_priority(typePref, localPref, componentId);
}
static QUdpSocket *takeFromSocketList(QList<QUdpSocket*> *socketList, const QHostAddress &addr, QObject *parent = 0)
static QUdpSocket *takeFromSocketList(QList<QUdpSocket*> *socketList, const QHostAddress &addr, QObject *parent = nullptr)
{
for(int n = 0; n < socketList->count(); ++n)
{
......
......@@ -115,7 +115,7 @@ public:
DL_Packet
};
IceComponent(int id, QObject *parent = 0);
IceComponent(int id, QObject *parent = nullptr);
~IceComponent();
int id() const;
......
......@@ -55,7 +55,7 @@ private:
int writtenCount;
public:
SafeUdpSocket(QUdpSocket *_sock, QObject *parent = 0) :
SafeUdpSocket(QUdpSocket *_sock, QObject *parent = nullptr) :
QObject(parent),
sess(this),
sock(_sock)
......
......@@ -48,7 +48,7 @@ public:
ErrorBind = ErrorCustom
};
IceLocalTransport(QObject *parent = 0);
IceLocalTransport(QObject *parent = nullptr);
~IceLocalTransport();
void setClientSoftwareNameAndVersion(const QString &str);
......
......@@ -46,7 +46,7 @@ public:
DL_Packet
};
IceTransport(QObject *parent = 0);
IceTransport(QObject *parent = nullptr);
~IceTransport();
virtual void stop() = 0;
......
......@@ -41,7 +41,7 @@ public:
ErrorTurn = ErrorCustom
};
IceTurnTransport(QObject *parent = 0);
IceTurnTransport(QObject *parent = nullptr);
~IceTurnTransport();
void setClientSoftwareNameAndVersion(const QString &str);
......
......@@ -58,7 +58,7 @@ class ServSockSignal : public QTcpServer
{
Q_OBJECT
public:
ServSockSignal(QObject *parent = 0);
ServSockSignal(QObject *parent = nullptr);
signals:
void connectionReady(qintptr);
......
......@@ -53,7 +53,7 @@ class SafeSocketNotifier : public QObject
Q_OBJECT
public:
SafeSocketNotifier(int socket, QSocketNotifier::Type type,
QObject *parent = 0) :
QObject *parent = nullptr) :
QObject(parent)
{
sn = new QSocketNotifier(socket, type, this);
......
......@@ -98,7 +98,7 @@ private:
friend class Private;
Private *d;
ProcessQuit(QObject *parent = 0);
ProcessQuit(QObject *parent = nullptr);
~ProcessQuit();
};
......
......@@ -78,7 +78,7 @@ public:
ErrorTimeout
};
StunTransaction(QObject *parent = 0);
StunTransaction(QObject *parent = nullptr);
~StunTransaction();
// toAddress/toPort are optional, to associate this request to a
......@@ -142,7 +142,7 @@ public:
DL_Packet