Commit 925ca5e6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: use nullptr now

parent 14dcd47a
......@@ -46,7 +46,7 @@ class InteractiveSMTPServerWindow : public QWidget
{
Q_OBJECT
public:
InteractiveSMTPServerWindow(QTcpSocket *socket, QWidget *parent = Q_NULLPTR);
InteractiveSMTPServerWindow(QTcpSocket *socket, QWidget *parent = nullptr);
~InteractiveSMTPServerWindow();
public Q_SLOTS:
......@@ -71,7 +71,7 @@ class InteractiveSMTPServer : public QTcpServer
Q_OBJECT
public:
InteractiveSMTPServer(QObject *parent = Q_NULLPTR);
InteractiveSMTPServer(QObject *parent = nullptr);
~InteractiveSMTPServer() {}
private Q_SLOTS:
......
......@@ -24,7 +24,7 @@ class RequestTest : public QObject
{
Q_OBJECT
public:
explicit RequestTest(QObject *parent = Q_NULLPTR);
explicit RequestTest(QObject *parent = nullptr);
~RequestTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
......
......@@ -40,7 +40,7 @@ class AddTransportDialog::Private
{
public:
Private(AddTransportDialog *qq)
: q(qq), okButton(Q_NULLPTR)
: q(qq), okButton(nullptr)
{
}
......
......@@ -45,7 +45,7 @@ public:
/**
Creates a new AddTransportDialog.
*/
explicit AddTransportDialog(QWidget *parent = Q_NULLPTR);
explicit AddTransportDialog(QWidget *parent = nullptr);
/**
Destroys the AddTransportDialog.
......
......@@ -31,7 +31,7 @@ class Q_DECL_HIDDEN Akonadi::FilterActionJob::Private
{
public:
Private(FilterActionJob *qq)
: q(qq), functor(Q_NULLPTR)
: q(qq), functor(nullptr)
{
}
......
......@@ -141,7 +141,7 @@ public:
* @param functor The FilterAction to use.
* @param parent The parent object.
*/
FilterActionJob(const Item &item, FilterAction *functor, QObject *parent = Q_NULLPTR);
FilterActionJob(const Item &item, FilterAction *functor, QObject *parent = nullptr);
/**
* Creates a filter action job to act on a set of items.
......@@ -150,7 +150,7 @@ public:
* @param functor The FilterAction to use.
* @param parent The parent object.
*/
FilterActionJob(const Item::List &items, FilterAction *functor, QObject *parent = Q_NULLPTR);
FilterActionJob(const Item::List &items, FilterAction *functor, QObject *parent = nullptr);
/**
* Creates a filter action job to act on items in a collection.
......@@ -160,7 +160,7 @@ public:
* @param functor The FilterAction to use.
* @param parent The parent object.
*/
FilterActionJob(const Collection &collection, FilterAction *functor, QObject *parent = Q_NULLPTR);
FilterActionJob(const Collection &collection, FilterAction *functor, QObject *parent = nullptr);
/**
* Destroys the filter action job.
......
......@@ -32,7 +32,7 @@ K_PLUGIN_FACTORY(MailTransportConfigFactory, registerPlugin<ConfigModule>();)
ConfigModule::ConfigModule(QWidget *parent, const QVariantList &args) :
KCModule(parent, args)
{
setButtons(Q_NULLPTR);
setButtons(nullptr);
QVBoxLayout *l = new QVBoxLayout(this);
l->setMargin(0);
TransportManagementWidget *tmw = new TransportManagementWidget(this);
......
......@@ -32,7 +32,7 @@ class ConfigModule : public KCModule
{
Q_OBJECT
public:
explicit ConfigModule(QWidget *parent = Q_NULLPTR,
explicit ConfigModule(QWidget *parent = nullptr,
const QVariantList &args = QVariantList());
};
......
......@@ -89,7 +89,7 @@ bool MessageQueueJob::Private::validate()
}
const int transport = transportAttribute.transportId();
if (TransportManager::self()->transportById(transport, false) == Q_NULLPTR) {
if (TransportManager::self()->transportById(transport, false) == nullptr) {
q->setError(UserDefinedError);
q->setErrorText(i18n("Message has invalid transport."));
q->emitResult();
......
......@@ -93,7 +93,7 @@ public:
@param parent the QObject parent
This is not an autostarting job; you need to call start() yourself.
*/
explicit MessageQueueJob(QObject *parent = Q_NULLPTR);
explicit MessageQueueJob(QObject *parent = nullptr);
/**
Destroys the MessageQueueJob.
......
......@@ -48,7 +48,7 @@ public:
};
PreCommandJobPrivate::PreCommandJobPrivate(PrecommandJob *parent)
: process(Q_NULLPTR), q(parent)
: process(nullptr), q(parent)
{
}
......@@ -94,7 +94,7 @@ void PreCommandJobPrivate::slotError(QProcess::ProcessError error)
bool PrecommandJob::doKill()
{
delete d->process;
d->process = Q_NULLPTR;
d->process = nullptr;
return true;
}
......
......@@ -51,7 +51,7 @@ public:
@param precommand The command to run.
@param parent The parent object.
*/
explicit PrecommandJob(const QString &precommand, QObject *parent = Q_NULLPTR);
explicit PrecommandJob(const QString &precommand, QObject *parent = nullptr);
/**
Destroys this job.
......
......@@ -49,7 +49,7 @@ public:
@param transport The transport object to use.
@param parent The parent object.
*/
explicit ResourceSendJob(Transport *transport, QObject *parent = Q_NULLPTR);
explicit ResourceSendJob(Transport *transport, QObject *parent = nullptr);
/**
Destroys this job.
......
......@@ -95,7 +95,7 @@ public:
}
ServerTestPrivate::ServerTestPrivate(ServerTest *test)
: q(test), testProgress(Q_NULLPTR), secureSocketFinished(false),
: q(test), testProgress(nullptr), secureSocketFinished(false),
normalSocketFinished(false), tlsFinished(false),
normalPossible(true), securePossible(true)
{
......
......@@ -64,7 +64,7 @@ public:
*
* @param parent The parent widget.
*/
ServerTest(QObject *parent = Q_NULLPTR);
ServerTest(QObject *parent = nullptr);
/**
* Destroys the server test.
......
......@@ -141,7 +141,7 @@ static void checkHighestEnabledButton(QButtonGroup *group)
void SMTPConfigWidget::init()
{
Q_D(SMTPConfigWidget);
d->serverTest = Q_NULLPTR;
d->serverTest = nullptr;
connect(TransportManager::self(), &TransportManager::passwordsChanged, this, &SMTPConfigWidget::passwordsLoaded);
......
......@@ -47,7 +47,7 @@ class SMTPConfigWidget : public TransportConfigWidget
Q_OBJECT
public:
explicit SMTPConfigWidget(Transport *transport, QWidget *parent = Q_NULLPTR);
explicit SMTPConfigWidget(Transport *transport, QWidget *parent = nullptr);
//virtual ~SMTPConfigWidget();
public Q_SLOTS:
......
......@@ -95,7 +95,7 @@ SmtpJob::SmtpJob(Transport *transport, QObject *parent)
: TransportJob(transport, parent), d(new SmtpJobPrivate(this))
{
d->currentState = SmtpJobPrivate::Idle;
d->slave = Q_NULLPTR;
d->slave = nullptr;
d->finished = false;
if (!s_slavePool.isDestroyed()) {
s_slavePool->ref++;
......@@ -177,7 +177,7 @@ void SmtpJob::startSmtpJob()
QPointer<KPasswordDialog> dlg =
new KPasswordDialog(
Q_NULLPTR,
nullptr,
KPasswordDialog::ShowUsernameLine |
KPasswordDialog::ShowKeepPassword);
dlg->setPrompt(i18n("You need to supply a username and a password "
......
......@@ -59,7 +59,7 @@ public:
@param transport The transport settings.
@param parent The parent object.
*/
explicit SmtpJob(Transport *transport, QObject *parent = Q_NULLPTR);
explicit SmtpJob(Transport *transport, QObject *parent = nullptr);
/**
Deletes this job.
......
......@@ -61,7 +61,7 @@ private:
SocketPrivate::SocketPrivate(Socket *s) :
q(s),
socket(Q_NULLPTR),
socket(nullptr),
port(0),
secure(false)
{
......
......@@ -235,7 +235,7 @@ bool Transport::usrSave()
if (!wallet || wallet->writePassword(QString::number(id()), d->password) != 0) {
// wallet saving failed, ask if we should store in the config file instead
if (d->storePasswordInFile || KMessageBox::warningYesNo(
Q_NULLPTR,
nullptr,
i18n("KWallet is not available. It is strongly recommended to use "
"KWallet for managing your passwords.\n"
"However, the password can be stored in the configuration "
......
......@@ -43,7 +43,7 @@ public:
Creates a new mail transport selection combo box.
@param parent The paren widget.
*/
TransportComboBox(QWidget *parent = Q_NULLPTR);
TransportComboBox(QWidget *parent = nullptr);
~TransportComboBox();
......
......@@ -44,7 +44,7 @@ class MailTransport::TransportConfigDialog::Private
{
public:
Private(TransportConfigDialog *qq)
: transport(Q_NULLPTR), configWidget(Q_NULLPTR), q(qq), okButton(Q_NULLPTR)
: transport(nullptr), configWidget(nullptr), q(qq), okButton(nullptr)
{
}
......@@ -97,7 +97,7 @@ TransportConfigDialog::TransportConfigDialog(Transport *transport, QWidget *pare
}
default: {
Q_ASSERT(false);
d->configWidget = Q_NULLPTR;
d->configWidget = nullptr;
break;
}
}
......
......@@ -56,7 +56,7 @@ public:
* added to the TransportManager yet.
* @param parent The parent widget.
*/
explicit TransportConfigDialog(Transport *transport, QWidget *parent = Q_NULLPTR);
explicit TransportConfigDialog(Transport *transport, QWidget *parent = nullptr);
/**
* Destroys the transport config dialog.
......
......@@ -67,7 +67,7 @@ public:
@param transport The Transport object to configure.
@param parent The parent widget.
*/
explicit TransportConfigWidget(Transport *transport, QWidget *parent = Q_NULLPTR);
explicit TransportConfigWidget(Transport *transport, QWidget *parent = nullptr);
/**
Destroys the widget.
......
......@@ -42,7 +42,7 @@ TransportJob::TransportJob(Transport *transport, QObject *parent)
: KCompositeJob(parent), d(new Private)
{
d->transport = transport;
d->buffer = Q_NULLPTR;
d->buffer = nullptr;
}
TransportJob::~ TransportJob()
......
......@@ -100,7 +100,7 @@ protected:
@param parent The parent object.
@see TransportManager::createTransportJob()
*/
explicit TransportJob(Transport *transport, QObject *parent = Q_NULLPTR);
explicit TransportJob(Transport *transport, QObject *parent = nullptr);
/**
Returns the sender of the mail.
......
......@@ -34,7 +34,7 @@ class TransportListView : public QTreeWidget
Q_OBJECT
public:
explicit TransportListView(QWidget *parent = Q_NULLPTR);
explicit TransportListView(QWidget *parent = nullptr);
//virtual ~TransportListView() {}
// overloaded from QTreeWidget
......
......@@ -42,7 +42,7 @@ public:
Creates a new TransportManagementWidget.
@param parent The parent widget.
*/
TransportManagementWidget(QWidget *parent = Q_NULLPTR);
TransportManagementWidget(QWidget *parent = nullptr);
/**
Destroys the widget.
......
......@@ -114,7 +114,7 @@ public:
StaticTransportManager() : TransportManager() {}
};
StaticTransportManager *sSelf = Q_NULLPTR;
StaticTransportManager *sSelf = nullptr;
static void destroyStaticTransportManager()
{
......@@ -131,7 +131,7 @@ TransportManager::TransportManager()
qAddPostRoutine(destroyStaticTransportManager);
d->myOwnChange = false;
d->appliedChange = false;
d->wallet = Q_NULLPTR;
d->wallet = nullptr;
d->walletOpenFailed = false;
d->walletAsyncOpen = false;
d->defaultTransportId = -1;
......@@ -182,7 +182,7 @@ Transport *TransportManager::transportById(int id, bool def) const
if (def || (id == 0 && d->defaultTransportId != id)) {
return transportById(d->defaultTransportId, false);
}
return Q_NULLPTR;
return nullptr;
}
Transport *TransportManager::transportByName(const QString &name, bool def) const
......@@ -195,7 +195,7 @@ Transport *TransportManager::transportByName(const QString &name, bool def) cons
if (def) {
return transportById(0, false);
}
return Q_NULLPTR;
return nullptr;
}
QList< Transport * > TransportManager::transports() const
......@@ -307,7 +307,7 @@ TransportJob *TransportManager::createTransportJob(int transportId)
{
Transport *t = transportById(transportId, false);
if (!t) {
return Q_NULLPTR;
return nullptr;
}
t = t->clone(); // Jobs delete their transports.
t->updatePasswordState();
......@@ -318,13 +318,13 @@ TransportJob *TransportManager::createTransportJob(int transportId)
return new ResourceSendJob(t, this);
}
Q_ASSERT(false);
return Q_NULLPTR;
return nullptr;
}
TransportJob *TransportManager::createTransportJob(const QString &transport)
{
bool ok = false;
Transport *t = Q_NULLPTR;
Transport *t = nullptr;
int transportId = transport.toInt(&ok);
if (ok) {
......@@ -339,7 +339,7 @@ TransportJob *TransportManager::createTransportJob(const QString &transport)
return createTransportJob(t->id());
}
return Q_NULLPTR;
return nullptr;
}
bool TransportManager::isEmpty() const
......@@ -434,7 +434,7 @@ void TransportManagerPrivate::readConfig()
if (re.indexIn(s) == -1) {
continue;
}
Transport *t = Q_NULLPTR;
Transport *t = nullptr;
// see if we happen to have that one already
foreach (Transport *old, oldTransports) {
......@@ -574,7 +574,7 @@ KWallet::Wallet *TransportManager::wallet()
}
if (!Wallet::isEnabled() || d->walletOpenFailed) {
return Q_NULLPTR;
return nullptr;
}
WId window = 0;
......@@ -589,7 +589,7 @@ KWallet::Wallet *TransportManager::wallet()
if (!d->wallet) {
d->walletOpenFailed = true;
return Q_NULLPTR;
return nullptr;
}
d->prepareWallet();
......@@ -671,7 +671,7 @@ void TransportManagerPrivate::slotWalletOpened(bool success)
if (!success) {
walletOpenFailed = true;
delete wallet;
wallet = Q_NULLPTR;
wallet = nullptr;
} else {
prepareWallet();
}
......@@ -717,7 +717,7 @@ void TransportManagerPrivate::migrateToWallet()
// ask user if he wants to migrate
int result = KMessageBox::questionYesNoList(
Q_NULLPTR,
nullptr,
i18n("The following mail transports store their passwords in an "
"unencrypted configuration file.\nFor security reasons, "
"please consider migrating these passwords to KWallet, the "
......
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