Commit c552bfed authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent ca0ff919
Pipeline #33165 passed with stage
in 19 minutes and 31 seconds
......@@ -37,11 +37,7 @@ using namespace MailTransport;
class SessionPool
{
public:
SessionPool() : ref(0)
{
}
int ref;
int ref = 0;
QHash<int, KSmtp::Session *> sessions;
void removeSession(KSmtp::Session *session)
......@@ -74,7 +70,7 @@ public:
{
}
SmtpJob *q;
SmtpJob *const q;
KSmtp::Session *session = nullptr;
KSmtp::SessionUiProxy::Ptr uiProxy;
enum State {
......
......@@ -19,11 +19,6 @@ using namespace MailTransport;
class MailTransportPluginInfo
{
public:
MailTransportPluginInfo()
: plugin(nullptr)
{
}
QString metaDataFileNameBaseName;
QString metaDataFileName;
MailTransport::TransportAbstractPlugin *plugin = nullptr;
......
......@@ -26,7 +26,7 @@ public:
PreCommandJobPrivate(PrecommandJob *parent);
QProcess *process = nullptr;
QString precommand;
PrecommandJob *q;
PrecommandJob *const q;
// Slots
void slotFinished(int, QProcess::ExitStatus);
......@@ -35,8 +35,7 @@ public:
};
PreCommandJobPrivate::PreCommandJobPrivate(PrecommandJob *parent)
: process(nullptr)
, q(parent)
: q(parent)
{
}
......
......@@ -16,12 +16,6 @@ using namespace MailTransport;
class Q_DECL_HIDDEN MailTransport::TransportJob::Private
{
public:
Private()
: transport(nullptr)
, buffer(nullptr)
{
}
QString sender;
QStringList to;
QStringList cc;
......
......@@ -68,7 +68,7 @@ public:
int defaultTransportId;
bool isMainInstance;
QList<TransportJob *> walletQueue;
TransportManager *q = nullptr;
TransportManager *const q;
void readConfig();
void writeConfig();
......
......@@ -24,7 +24,7 @@ public:
Private(TransportManagementWidget *parent);
Ui::TransportManagementWidget ui;
TransportManagementWidget *q;
TransportManagementWidget *const q;
// Slots
void defaultClicked();
......
......@@ -19,7 +19,6 @@ class Q_DECL_HIDDEN Akonadi::FilterActionJob::Private
public:
Private(FilterActionJob *qq)
: q(qq)
, functor(nullptr)
{
}
......@@ -28,7 +27,7 @@ public:
delete functor;
}
FilterActionJob *q;
FilterActionJob *const q;
Collection collection;
Item::List items;
FilterAction *functor = nullptr;
......
......@@ -34,7 +34,6 @@ public:
Private(MessageQueueJob *qq)
: q(qq)
{
started = false;
}
MessageQueueJob *const q;
......@@ -45,7 +44,7 @@ public:
SentBehaviourAttribute sentBehaviourAttribute;
SentActionAttribute sentActionAttribute;
AddressAttribute addressAttribute;
bool started;
bool started = false;
/**
Returns true if this message has everything it needs and is ready to be
......
......@@ -17,7 +17,6 @@ class SentActionAttribute::Action::Private : public QSharedData
{
public:
Private()
: mType(Invalid)
{
}
......@@ -28,7 +27,7 @@ public:
mValue = other.mValue;
}
Type mType;
Type mType = Invalid;
QVariant mValue;
};
......
......@@ -13,14 +13,12 @@ class Q_DECL_HIDDEN SentBehaviourAttribute::Private
{
public:
Private()
: mBehaviour(SentBehaviourAttribute::MoveToDefaultSentCollection)
, mSilent(false)
{
}
SentBehaviourAttribute::SentBehaviour mBehaviour;
SentBehaviourAttribute::SentBehaviour mBehaviour = SentBehaviourAttribute::MoveToDefaultSentCollection;
Akonadi::Collection mMoveToCollection;
bool mSilent;
bool mSilent = false;
};
SentBehaviourAttribute::SentBehaviourAttribute(SentBehaviour beh, const Collection &moveToCollection, bool sendSilently)
......
......@@ -14,12 +14,7 @@ using namespace MailTransport;
class Q_DECL_HIDDEN TransportAttribute::Private
{
public:
Private()
: mId(-1)
{
}
int mId;
int mId = -1;
};
TransportAttribute::TransportAttribute(int id)
......
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