Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMailTransport
Commits
cf2b63d1
Commit
cf2b63d1
authored
Oct 09, 2021
by
Friedrich W. H. Kossebau
Browse files
Consistently use std::unique_ptr to manage lifetime of pimpl object
GIT_SILENT
parent
375f51df
Changes
38
Hide whitespace changes
Inline
Side-by-side
src/kmailtransport/plugins/smtp/smtpjob.cpp
View file @
cf2b63d1
...
...
@@ -102,7 +102,6 @@ SmtpJob::~SmtpJob()
}
}
}
delete
d
;
}
void
SmtpJob
::
doStart
()
...
...
src/kmailtransport/plugins/smtp/smtpjob.h
View file @
cf2b63d1
...
...
@@ -12,6 +12,8 @@
#include
<KSMTP/Session>
#include
<transportjob.h>
#include
<memory>
namespace
KIO
{
class
Job
;
...
...
@@ -70,7 +72,7 @@ private:
private:
friend
class
::
SmtpJobPrivate
;
SmtpJobPrivate
*
const
d
;
std
::
unique_ptr
<
SmtpJobPrivate
>
const
d
;
};
}
// namespace MailTransport
src/kmailtransport/plugins/transportpluginmanager.cpp
View file @
cf2b63d1
...
...
@@ -106,10 +106,7 @@ TransportPluginManager::TransportPluginManager(QObject *parent)
{
}
TransportPluginManager
::~
TransportPluginManager
()
{
delete
d
;
}
TransportPluginManager
::~
TransportPluginManager
()
=
default
;
TransportPluginManager
*
TransportPluginManager
::
self
()
{
...
...
src/kmailtransport/plugins/transportpluginmanager.h
View file @
cf2b63d1
...
...
@@ -8,6 +8,9 @@
#include
"kmailtransport_private_export.h"
#include
<QObject>
#include
<memory>
namespace
MailTransport
{
class
TransportAbstractPlugin
;
...
...
@@ -28,7 +31,7 @@ Q_SIGNALS:
void
updatePluginList
();
private:
TransportPluginManagerPrivate
*
const
d
;
std
::
unique_ptr
<
TransportPluginManagerPrivate
>
const
d
;
};
}
src/kmailtransport/precommandjob.cpp
View file @
cf2b63d1
...
...
@@ -56,10 +56,7 @@ PrecommandJob::PrecommandJob(const QString &precommand, QObject *parent)
});
}
PrecommandJob
::~
PrecommandJob
()
{
delete
d
;
}
PrecommandJob
::~
PrecommandJob
()
=
default
;
void
PrecommandJob
::
start
()
{
...
...
src/kmailtransport/precommandjob.h
View file @
cf2b63d1
...
...
@@ -14,6 +14,8 @@
#include
<KJob>
#include
<memory>
class
PreCommandJobPrivate
;
namespace
MailTransport
...
...
@@ -57,7 +59,7 @@ protected:
private:
friend
class
::
PreCommandJobPrivate
;
PreCommandJobPrivate
*
const
d
;
std
::
unique_ptr
<
PreCommandJobPrivate
>
const
d
;
};
}
// namespace MailTransport
src/kmailtransport/servertest.cpp
View file @
cf2b63d1
...
...
@@ -532,14 +532,11 @@ ServerTest::ServerTest(QObject *parent)
connect
(
d
->
progressTimer
,
SIGNAL
(
timeout
()),
SLOT
(
slotUpdateProgress
()));
}
ServerTest
::~
ServerTest
()
{
delete
d
;
}
ServerTest
::~
ServerTest
()
=
default
;
void
ServerTest
::
start
()
{
qCDebug
(
MAILTRANSPORT_LOG
)
<<
d
;
qCDebug
(
MAILTRANSPORT_LOG
)
<<
d
.
get
()
;
d
->
connectionResults
.
clear
();
d
->
authenticationResults
.
clear
();
...
...
src/kmailtransport/servertest.h
View file @
cf2b63d1
...
...
@@ -13,6 +13,8 @@
#include
<QList>
#include
<QObject>
#include
<memory>
class
QProgressBar
;
namespace
MailTransport
...
...
@@ -195,7 +197,7 @@ Q_SIGNALS:
private:
Q_DECLARE_PRIVATE
(
ServerTest
)
ServerTestPrivate
*
const
d
;
std
::
unique_ptr
<
ServerTestPrivate
>
const
d
;
Q_PRIVATE_SLOT
(
d
,
void
slotNormalPossible
())
Q_PRIVATE_SLOT
(
d
,
void
slotTlsDone
())
...
...
src/kmailtransport/socket.cpp
View file @
cf2b63d1
...
...
@@ -124,7 +124,6 @@ Socket::Socket(QObject *parent)
Socket
::~
Socket
()
{
qCDebug
(
MAILTRANSPORT_LOG
);
delete
d
;
}
void
Socket
::
reconnect
()
...
...
src/kmailtransport/socket.h
View file @
cf2b63d1
...
...
@@ -10,6 +10,8 @@
#include
<QSslSocket>
#include
<memory>
namespace
MailTransport
{
class
SocketPrivate
;
...
...
@@ -86,7 +88,7 @@ public:
private:
Q_DECLARE_PRIVATE
(
Socket
)
SocketPrivate
*
const
d
;
std
::
unique_ptr
<
SocketPrivate
>
const
d
;
Q_PRIVATE_SLOT
(
d
,
void
slotConnected
())
Q_PRIVATE_SLOT
(
d
,
void
slotStateChanged
(
QAbstractSocket
::
SocketState
state
))
...
...
src/kmailtransport/transport.cpp
View file @
cf2b63d1
...
...
@@ -34,10 +34,7 @@ Transport::Transport(const QString &cfgGroup)
loadPassword
();
}
Transport
::~
Transport
()
{
delete
d
;
}
Transport
::~
Transport
()
=
default
;
bool
Transport
::
isValid
()
const
{
...
...
src/kmailtransport/transport.h
View file @
cf2b63d1
...
...
@@ -10,6 +10,8 @@
#include
<transportbase.h>
#include
<transporttype.h>
#include
<memory>
class
TransportPrivate
;
namespace
QKeychain
{
...
...
@@ -142,7 +144,9 @@ private Q_SLOTS:
private:
void
readTransportPasswordFinished
(
QKeychain
::
Job
*
baseJob
);
void
loadPassword
();
TransportPrivate
*
const
d
;
private:
std
::
unique_ptr
<
TransportPrivate
>
const
d
;
};
}
// namespace MailTransport
src/kmailtransport/transportjob.cpp
View file @
cf2b63d1
...
...
@@ -37,7 +37,6 @@ TransportJob::TransportJob(Transport *transport, QObject *parent)
TransportJob
::~
TransportJob
()
{
delete
d
->
transport
;
delete
d
;
}
void
TransportJob
::
setSender
(
const
QString
&
sender
)
...
...
src/kmailtransport/transportjob.h
View file @
cf2b63d1
...
...
@@ -12,6 +12,8 @@
#include
<KCompositeJob>
#include
<memory>
class
QBuffer
;
namespace
MailTransport
...
...
@@ -136,7 +138,7 @@ protected:
private:
//@cond PRIVATE
class
Private
;
Private
*
const
d
;
std
::
unique_ptr
<
Private
>
const
d
;
//@endcond
};
}
// namespace MailTransport
...
...
src/kmailtransport/transportmanager.cpp
View file @
cf2b63d1
...
...
@@ -137,7 +137,6 @@ TransportManager::TransportManager()
TransportManager
::~
TransportManager
()
{
qRemovePostRoutine
(
destroyStaticTransportManager
);
delete
d
;
}
TransportManager
*
TransportManager
::
self
()
...
...
src/kmailtransport/transportmanager.h
View file @
cf2b63d1
...
...
@@ -12,6 +12,8 @@
#include
<QList>
#include
<QObject>
#include
<memory>
namespace
KWallet
{
class
Wallet
;
...
...
@@ -274,7 +276,7 @@ private:
void
updatePluginList
();
private:
TransportManagerPrivate
*
const
d
;
std
::
unique_ptr
<
TransportManagerPrivate
>
const
d
;
Q_PRIVATE_SLOT
(
d
,
void
slotTransportsChanged
())
};
...
...
src/kmailtransport/widgets/addtransportdialogng.cpp
View file @
cf2b63d1
...
...
@@ -144,7 +144,6 @@ AddTransportDialogNG::AddTransportDialogNG(QWidget *parent)
AddTransportDialogNG
::~
AddTransportDialogNG
()
{
d
->
writeConfig
();
delete
d
;
}
void
AddTransportDialogNG
::
accept
()
...
...
src/kmailtransport/widgets/addtransportdialogng.h
View file @
cf2b63d1
...
...
@@ -9,6 +9,8 @@
#include
"kmailtransport_private_export.h"
#include
<QDialog>
#include
<memory>
namespace
MailTransport
{
/**
...
...
@@ -43,7 +45,7 @@ public:
private:
class
Private
;
Private
*
const
d
;
std
::
unique_ptr
<
Private
>
const
d
;
};
}
// namespace MailTransport
src/kmailtransport/widgets/transportcombobox.cpp
View file @
cf2b63d1
...
...
@@ -29,10 +29,7 @@ TransportComboBox::TransportComboBox(QWidget *parent)
connect
(
TransportManager
::
self
(),
&
TransportManager
::
transportRemoved
,
this
,
&
TransportComboBox
::
transportRemoved
);
}
TransportComboBox
::~
TransportComboBox
()
{
delete
d
;
}
TransportComboBox
::~
TransportComboBox
()
=
default
;
int
TransportComboBox
::
currentTransportId
()
const
{
...
...
src/kmailtransport/widgets/transportcombobox.h
View file @
cf2b63d1
...
...
@@ -11,6 +11,8 @@
#include
<QComboBox>
#include
<memory>
class
TransportComboBoxPrivate
;
namespace
MailTransport
...
...
@@ -61,7 +63,7 @@ public Q_SLOTS:
void
updateComboboxList
();
private:
TransportComboBoxPrivate
*
const
d
;
std
::
unique_ptr
<
TransportComboBoxPrivate
>
const
d
;
};
}
// namespace MailTransport
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment