Commit df28fc17 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

run-clang-tidy.py -header-filter='.*' -checks='-*,modernize-use-nullptr' -fix

With a small manual fix
parent b1352149
......@@ -93,8 +93,8 @@ public:
Private()
{
progress = 0;
actionsList = 0;
progress = nullptr;
actionsList = nullptr;
}
QListWidget* actionsList;
......@@ -217,8 +217,8 @@ class KPBatchProgressDialog::Private
public:
Private()
: progressWidget(0),
buttonBox(0)
: progressWidget(nullptr),
buttonBox(nullptr)
{
}
......@@ -227,7 +227,7 @@ public:
};
KPBatchProgressDialog::KPBatchProgressDialog(QWidget* const /*parent*/, const QString& caption)
: QDialog(0),
: QDialog(nullptr),
d(new Private)
{
setModal(false);
......
......@@ -54,7 +54,7 @@ class KIPIPLUGINS_EXPORT KPBatchProgressWidget : public KPVBox
public:
explicit KPBatchProgressWidget(QWidget* const parent=0);
explicit KPBatchProgressWidget(QWidget* const parent=nullptr);
~KPBatchProgressWidget();
void addedAction(const QString& text, int type);
......@@ -95,7 +95,7 @@ class KIPIPLUGINS_EXPORT KPBatchProgressDialog : public QDialog
public:
explicit KPBatchProgressDialog(QWidget* const parent=0, const QString& caption=QString());
explicit KPBatchProgressDialog(QWidget* const parent=nullptr, const QString& caption=QString());
~KPBatchProgressDialog();
KPBatchProgressWidget* progressWidget() const;
......
......@@ -61,10 +61,10 @@ public:
Private()
{
imageLabel = 0;
infoLabel = 0;
iface = 0;
meta = 0;
imageLabel = nullptr;
infoLabel = nullptr;
iface = nullptr;
meta = nullptr;
PluginLoader* const pl = PluginLoader::instance();
......@@ -280,7 +280,7 @@ public:
{
onlyRaw = false;
singleSelect = false;
iface = 0;
iface = nullptr;
PluginLoader* const pl = PluginLoader::instance();
......
......@@ -43,7 +43,7 @@ class KIPIPLUGINS_EXPORT KPImageDialogPreview : public QScrollArea
public:
explicit KPImageDialogPreview(QWidget* const parent=0);
explicit KPImageDialogPreview(QWidget* const parent=nullptr);
~KPImageDialogPreview();
QSize sizeHint() const Q_DECL_OVERRIDE;
......
......@@ -55,9 +55,9 @@ public:
Private()
{
about = 0;
dialog = 0;
iface = 0;
about = nullptr;
dialog = nullptr;
iface = nullptr;
PluginLoader* const pl = PluginLoader::instance();
......@@ -116,7 +116,7 @@ QPushButton* KPDialogBase::getHelpButton() const
}
}
return 0;
return nullptr;
}
void KPDialogBase::setAboutData(KPAboutData* const data, QPushButton* help)
......@@ -144,9 +144,9 @@ class KPToolDialog::Private
{
public:
Private()
: buttonBox(0),
startButton(0),
mainWidget(0),
: buttonBox(nullptr),
startButton(nullptr),
mainWidget(nullptr),
propagateReject(true)
{
}
......
......@@ -55,7 +55,7 @@ public:
KPDialogBase(QDialog* const dlg);
virtual ~KPDialogBase();
void setAboutData(KPAboutData* const data, QPushButton* help=0);
void setAboutData(KPAboutData* const data, QPushButton* help=nullptr);
Interface* iface() const;
......@@ -77,7 +77,7 @@ class KIPIPLUGINS_EXPORT KPToolDialog : public QDialog, public KPDialogBase
public:
KPToolDialog(QWidget* const parent = 0);
KPToolDialog(QWidget* const parent = nullptr);
virtual ~KPToolDialog();
void setMainWidget(QWidget* const widget);
......@@ -114,7 +114,7 @@ class KIPIPLUGINS_EXPORT KPWizardDialog : public QWizard, public KPDialogBase
{
public:
KPWizardDialog(QWidget* const parent=0);
KPWizardDialog(QWidget* const parent=nullptr);
virtual ~KPWizardDialog();
private:
......
......@@ -45,13 +45,13 @@ public:
Private()
{
hlay = 0;
logo = 0;
leftBottomPix = 0;
leftView = 0;
hlay = nullptr;
logo = nullptr;
leftBottomPix = nullptr;
leftView = nullptr;
isComplete = true;
id = -1;
dlg = 0;
dlg = nullptr;
}
bool isComplete;
......
......@@ -11,7 +11,7 @@ class O0_EXPORT O0AbstractStore: public QObject {
Q_OBJECT
public:
explicit O0AbstractStore(QObject *parent = 0): QObject(parent) {
explicit O0AbstractStore(QObject *parent = nullptr): QObject(parent) {
}
/// Retrieve a string value by key.
......
......@@ -7,7 +7,7 @@
static const quint16 DefaultLocalPort = 1965;
O0BaseAuth::O0BaseAuth(QObject *parent, O0AbstractStore *store): QObject(parent), store_(0) {
O0BaseAuth::O0BaseAuth(QObject *parent, O0AbstractStore *store): QObject(parent), store_(nullptr) {
localPort_ = DefaultLocalPort;
setStore(store);
}
......
......@@ -17,7 +17,7 @@ class O0_EXPORT O0BaseAuth : public QObject {
Q_OBJECT
public:
explicit O0BaseAuth(QObject *parent = 0, O0AbstractStore *store = 0);
explicit O0BaseAuth(QObject *parent = nullptr, O0AbstractStore *store = nullptr);
public:
/// Are we authenticated?
......
......@@ -14,10 +14,10 @@ class O0_EXPORT O0SettingsStore: public O0AbstractStore {
public:
/// Constructor
explicit O0SettingsStore(const QString &encryptionKey, QObject *parent = 0);
explicit O0SettingsStore(const QString &encryptionKey, QObject *parent = nullptr);
/// Construct with an explicit QSettings instance
explicit O0SettingsStore(QSettings *settings, const QString &encryptionKey, QObject *parent = 0);
explicit O0SettingsStore(QSettings *settings, const QString &encryptionKey, QObject *parent = nullptr);
/// Group key prefix
Q_PROPERTY(QString groupKey READ groupKey WRITE setGroupKey NOTIFY groupKeyChanged)
......
......@@ -56,7 +56,7 @@ public:
void setAccessTokenUrl(const QUrl &value);
/// Constructor.
explicit O1(QObject *parent = 0, QNetworkAccessManager *manager = 0, O0AbstractStore *store = 0);
explicit O1(QObject *parent = nullptr, QNetworkAccessManager *manager = nullptr, O0AbstractStore *store = nullptr);
/// Parse a URL-encoded response string.
static QMap<QString, QString> parseResponse(const QByteArray &response);
......
......@@ -17,7 +17,7 @@ class O0_EXPORT O1Requestor: public QObject {
Q_OBJECT
public:
explicit O1Requestor(QNetworkAccessManager *manager, O1 *authenticator, QObject *parent = 0);
explicit O1Requestor(QNetworkAccessManager *manager, O1 *authenticator, QObject *parent = nullptr);
public Q_SLOTS:
/// Make a GET request.
......
......@@ -94,7 +94,7 @@ public:
public:
/// Constructor.
/// @param parent Parent object.
explicit O2(QObject *parent = 0, QNetworkAccessManager *manager = 0, O0AbstractStore *store = 0);
explicit O2(QObject *parent = nullptr, QNetworkAccessManager *manager = nullptr, O0AbstractStore *store = nullptr);
/// Get authentication code.
QString code();
......
......@@ -44,7 +44,7 @@ O2Reply *O2ReplyList::find(QNetworkReply *reply) {
return timedReply;
}
}
return 0;
return nullptr;
}
bool O2ReplyList::ignoreSslErrors()
......
......@@ -15,7 +15,7 @@ class O0_EXPORT O2Reply: public QTimer {
Q_OBJECT
public:
O2Reply(QNetworkReply *reply, int timeOut = 60 * 1000, QObject *parent = 0);
O2Reply(QNetworkReply *reply, int timeOut = 60 * 1000, QObject *parent = nullptr);
Q_SIGNALS:
void error(QNetworkReply::NetworkError);
......
......@@ -13,7 +13,7 @@ class O0_EXPORT O2ReplyServer: public QTcpServer {
Q_OBJECT
public:
explicit O2ReplyServer(QObject *parent = 0);
explicit O2ReplyServer(QObject *parent = nullptr);
/// Page content on local host after successful oauth - in case you do not want to close the browser, but display something
Q_PROPERTY(QByteArray replyContent READ replyContent WRITE setReplyContent)
......@@ -38,7 +38,7 @@ public Q_SLOTS:
void onIncomingConnection();
void onBytesReady();
QMap<QString, QString> parseQueryParams(QByteArray *data);
void closeServer(QTcpSocket *socket = 0, bool hasparameters = false);
void closeServer(QTcpSocket *socket = nullptr, bool hasparameters = false);
protected:
QByteArray replyContent_;
......
......@@ -8,7 +8,7 @@
#include "o2.h"
#include "o0globals.h"
O2Requestor::O2Requestor(QNetworkAccessManager *manager, O2 *authenticator, QObject *parent): QObject(parent), reply_(NULL), status_(Idle) {
O2Requestor::O2Requestor(QNetworkAccessManager *manager, O2 *authenticator, QObject *parent): QObject(parent), reply_(nullptr), status_(Idle) {
manager_ = manager;
authenticator_ = authenticator;
if (authenticator) {
......
......@@ -18,7 +18,7 @@ class O0_EXPORT O2Requestor: public QObject {
Q_OBJECT
public:
explicit O2Requestor(QNetworkAccessManager *manager, O2 *authenticator, QObject *parent = 0);
explicit O2Requestor(QNetworkAccessManager *manager, O2 *authenticator, QObject *parent = nullptr);
~O2Requestor();
public Q_SLOTS:
......
......@@ -49,7 +49,7 @@ class KPImageInfo::Private
public:
Private()
: iface(0)
: iface(nullptr)
{
PluginLoader* const pl = PluginLoader::instance();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment