Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
d0ed1be2
Commit
d0ed1be2
authored
Jun 21, 2021
by
Laurent Montel
😁
Browse files
Const'ify + remove unused KCM_KPIMIDENTITIES_STANDALONE
parent
67b53edd
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/identity/identitydialog.cpp
View file @
d0ed1be2
...
...
@@ -24,10 +24,8 @@
#include "xfaceconfigurator.h"
#include <KEditListWidget>
#include <MailCommon/FolderRequester>
#ifndef KCM_KPIMIDENTITIES_STANDALONE
#include "kmkernel.h"
#include "settings/kmailsettings.h"
#endif
#include <MailCommon/MailKernel>
...
...
@@ -105,9 +103,12 @@ class KeySelectionCombo : public Kleo::KeySelectionCombo
Q_OBJECT
public:
enum
KeyType
{
SigningKey
,
EncryptionKey
};
enum
KeyType
{
SigningKey
,
EncryptionKey
,
};
KeySelectionCombo
(
KeyType
keyType
,
GpgME
::
Protocol
protocol
,
QWidget
*
parent
);
explicit
KeySelectionCombo
(
KeyType
keyType
,
GpgME
::
Protocol
protocol
,
QWidget
*
parent
);
~
KeySelectionCombo
()
override
;
void
setIdentity
(
const
QString
&
name
,
const
QString
&
email
);
...
...
@@ -118,8 +119,8 @@ private:
void
onCustomItemSelected
(
const
QVariant
&
type
);
QString
mEmail
;
QString
mName
;
KeyType
mKeyType
;
GpgME
::
Protocol
mProtocol
;
const
KeyType
mKeyType
;
const
GpgME
::
Protocol
mProtocol
;
};
class
KeyGenerationJob
:
public
QGpgME
::
Job
...
...
@@ -127,7 +128,7 @@ class KeyGenerationJob : public QGpgME::Job
Q_OBJECT
public:
KeyGenerationJob
(
const
QString
&
name
,
const
QString
&
email
,
KeySelectionCombo
*
parent
);
explicit
KeyGenerationJob
(
const
QString
&
name
,
const
QString
&
email
,
KeySelectionCombo
*
parent
);
~
KeyGenerationJob
()
override
;
void
slotCancel
()
override
;
...
...
@@ -678,9 +679,7 @@ IdentityDialog::IdentityDialog(QWidget *parent)
mXFaceConfigurator
=
new
XFaceConfigurator
(
mTabWidget
);
mTabWidget
->
addTab
(
mXFaceConfigurator
,
i18n
(
"Picture"
));
#ifndef KCM_KPIMIDENTITIES_STANDALONE
resize
(
KMailSettings
::
self
()
->
identityDialogSize
());
#endif
mNameEdit
->
setFocus
();
connect
(
mTabWidget
,
&
QTabWidget
::
currentChanged
,
this
,
&
IdentityDialog
::
slotAboutToShow
);
...
...
@@ -688,9 +687,7 @@ IdentityDialog::IdentityDialog(QWidget *parent)
IdentityDialog
::~
IdentityDialog
()
{
#ifndef KCM_KPIMIDENTITIES_STANDALONE
KMailSettings
::
self
()
->
setIdentityDialogSize
(
size
());
#endif
}
void
IdentityDialog
::
slotHelp
()
...
...
src/identity/identitylistview.cpp
View file @
d0ed1be2
...
...
@@ -13,9 +13,7 @@
#include <KIdentityManagement/kidentitymanagement/identity.h>
#include <KIdentityManagement/kidentitymanagement/identitymanager.h>
#ifndef KCM_KPIMIDENTITIES_STANDALONE
#include "kmkernel.h"
#endif
#include "kmail_debug.h"
#include <KLocalizedString>
...
...
src/identity/identitypage.cpp
View file @
d0ed1be2
...
...
@@ -13,10 +13,8 @@
#include "identitydialog.h"
#include "newidentitydialog.h"
#ifndef KCM_KPIMIDENTITIES_STANDALONE
#include "kmkernel.h"
#include "settings/kmailsettings.h"
#endif
#include <MailCommon/MailKernel>
...
...
@@ -96,7 +94,6 @@ void IdentityPage::save()
mIdentityManager
->
sort
();
mIdentityManager
->
commit
();
#ifndef KCM_KPIMIDENTITIES_STANDALONE
if
(
mOldNumberOfIdentities
<
2
&&
mIPage
.
mIdentityList
->
topLevelItemCount
()
>
1
)
{
// have more than one identity, so better show the combo in the
// composer now:
...
...
@@ -111,7 +108,6 @@ void IdentityPage::save()
showHeaders
&=
~
KMail
::
Composer
::
HDR_IDENTITY
;
KMailSettings
::
self
()
->
setHeaders
(
showHeaders
);
}
#endif
}
void
IdentityPage
::
slotNewIdentity
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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