Commit fd9480a0 authored by Laurent Montel's avatar Laurent Montel 😁

const'ify pointer

parent bd3040ab
Pipeline #36579 failed with stage
in 122 minutes and 40 seconds
......@@ -36,7 +36,6 @@ void AntiSpamPluginInterface::slotActivated()
void AntiSpamPluginInterface::exec()
{
QPointer<KMail::AntiSpamWizard> wiz = new KMail::AntiSpamWizard(KMail::AntiSpamWizard::AntiSpam, parentWidget());
wiz->exec();
delete wiz;
KMail::AntiSpamWizard wiz(KMail::AntiSpamWizard::AntiSpam, parentWidget());
wiz.exec();
}
......@@ -21,8 +21,8 @@ using namespace MailTransport;
SendmailJob::SendmailJob(Transport *transport, QObject *parent)
: TransportJob(transport, parent)
, mProcess(new QProcess(this))
{
mProcess = new QProcess(this);
connect(mProcess, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, &SendmailJob::sendmailExited);
connect(mProcess, qOverload<QProcess::ProcessError>(&QProcess::errorOccurred),
this, &SendmailJob::receivedError);
......@@ -79,6 +79,5 @@ void SendmailJob::receivedStdErr()
bool SendmailJob::doKill()
{
delete mProcess;
mProcess = nullptr;
return true;
}
......@@ -48,7 +48,7 @@ private Q_SLOTS:
private:
QString mLastError;
QProcess *mProcess = nullptr;
QProcess *const mProcess;
};
} // namespace MailTransport
......
......@@ -15,7 +15,6 @@
#include <KLocalizedString>
Datenums::Datenums()
: mDisplayedInfo(DayOfYear | DaysRemaining)
{
KConfig _config(QStringLiteral("korganizerrc"), KConfig::NoGlobals);
KConfigGroup config(&_config, "Calendar/Datenums Plugin");
......
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