Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
Kleopatra
Commits
e5c8e108
Commit
e5c8e108
authored
Sep 16, 2020
by
Ingo Klöcker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace one-liner slots with lambdas
parent
21f911b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
30 deletions
+4
-30
src/view/pivcardwidget.cpp
src/view/pivcardwidget.cpp
+4
-24
src/view/pivcardwidget.h
src/view/pivcardwidget.h
+0
-6
No files found.
src/view/pivcardwidget.cpp
View file @
e5c8e108
...
...
@@ -105,7 +105,7 @@ PIVCardWidget::PIVCardWidget(QWidget *parent):
mGeneratePIVAuthenticationKeyBtn
->
setText
(
i18nc
(
"@action:button"
,
"Generate"
));
mGeneratePIVAuthenticationKeyBtn
->
setEnabled
(
false
);
grid
->
addWidget
(
mGeneratePIVAuthenticationKeyBtn
,
row
,
2
);
connect
(
mGeneratePIVAuthenticationKeyBtn
,
&
QPushButton
::
clicked
,
this
,
&
PIVCardWidget
::
generatePIV
AuthenticationKey
);
connect
(
mGeneratePIVAuthenticationKeyBtn
,
&
QPushButton
::
clicked
,
this
,
[
this
]
()
{
generateKey
(
PIVCard
::
piv
AuthenticationKey
Ref
());
}
);
mWritePIVAuthenticationCertificateBtn
->
setText
(
i18nc
(
"@action:button"
,
"Write Certificate"
));
mWritePIVAuthenticationCertificateBtn
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Write the certificate corresponding to this key to the card"
));
mWritePIVAuthenticationCertificateBtn
->
setEnabled
(
false
);
...
...
@@ -119,7 +119,7 @@ PIVCardWidget::PIVCardWidget(QWidget *parent):
mGenerateCardAuthenticationKeyBtn
->
setText
(
i18nc
(
"@action:button"
,
"Generate"
));
mGenerateCardAuthenticationKeyBtn
->
setEnabled
(
false
);
grid
->
addWidget
(
mGenerateCardAuthenticationKeyBtn
,
row
,
2
);
connect
(
mGenerateCardAuthenticationKeyBtn
,
&
QPushButton
::
clicked
,
this
,
&
PIVCardWidget
::
generateC
ardAuthenticationKey
);
connect
(
mGenerateCardAuthenticationKeyBtn
,
&
QPushButton
::
clicked
,
this
,
[
this
]
()
{
generateKey
(
PIVCard
::
c
ardAuthenticationKey
Ref
());
}
);
mWriteCardAuthenticationCertificateBtn
->
setText
(
i18nc
(
"@action:button"
,
"Write Certificate"
));
mWriteCardAuthenticationCertificateBtn
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Write the certificate corresponding to this key to the card"
));
mWriteCardAuthenticationCertificateBtn
->
setEnabled
(
false
);
...
...
@@ -133,7 +133,7 @@ PIVCardWidget::PIVCardWidget(QWidget *parent):
mGenerateDigitalSignatureKeyBtn
->
setText
(
i18nc
(
"@action:button"
,
"Generate"
));
mGenerateDigitalSignatureKeyBtn
->
setEnabled
(
false
);
grid
->
addWidget
(
mGenerateDigitalSignatureKeyBtn
,
row
,
2
);
connect
(
mGenerateDigitalSignatureKeyBtn
,
&
QPushButton
::
clicked
,
this
,
&
PIVCardWidget
::
generateD
igitalSignatureKey
);
connect
(
mGenerateDigitalSignatureKeyBtn
,
&
QPushButton
::
clicked
,
this
,
[
this
]
()
{
generateKey
(
PIVCard
::
d
igitalSignatureKey
Ref
());
}
);
mWriteDigitalSignatureCertificateBtn
->
setText
(
i18nc
(
"@action:button"
,
"Write Certificate"
));
mWriteDigitalSignatureCertificateBtn
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Write the certificate corresponding to this key to the card"
));
mWriteDigitalSignatureCertificateBtn
->
setEnabled
(
false
);
...
...
@@ -147,7 +147,7 @@ PIVCardWidget::PIVCardWidget(QWidget *parent):
mGenerateKeyManagementKeyBtn
->
setText
(
i18nc
(
"@action:button"
,
"Generate"
));
mGenerateKeyManagementKeyBtn
->
setEnabled
(
false
);
grid
->
addWidget
(
mGenerateKeyManagementKeyBtn
,
row
,
2
);
connect
(
mGenerateKeyManagementKeyBtn
,
&
QPushButton
::
clicked
,
this
,
&
PIVCardWidget
::
generateK
eyManagementKey
);
connect
(
mGenerateKeyManagementKeyBtn
,
&
QPushButton
::
clicked
,
this
,
[
this
]
()
{
generateKey
(
PIVCard
::
k
eyManagementKey
Ref
());
}
);
mWriteKeyManagementCertificateBtn
->
setText
(
i18nc
(
"@action:button"
,
"Write Certificate"
));
mWriteKeyManagementCertificateBtn
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Write the certificate corresponding to this key to the card"
));
mWriteKeyManagementCertificateBtn
->
setEnabled
(
false
);
...
...
@@ -249,26 +249,6 @@ void PIVCardWidget::writeCertificateToCard(const std::string &keyref)
cmd
->
start
();
}
void
PIVCardWidget
::
generatePIVAuthenticationKey
()
{
generateKey
(
PIVCard
::
pivAuthenticationKeyRef
());
}
void
PIVCardWidget
::
generateCardAuthenticationKey
()
{
generateKey
(
PIVCard
::
cardAuthenticationKeyRef
());
}
void
PIVCardWidget
::
generateDigitalSignatureKey
()
{
generateKey
(
PIVCard
::
digitalSignatureKeyRef
());
}
void
PIVCardWidget
::
generateKeyManagementKey
()
{
generateKey
(
PIVCard
::
keyManagementKeyRef
());
}
void
PIVCardWidget
::
changePin
(
const
std
::
string
&
keyRef
)
{
auto
cmd
=
new
ChangePinCommand
(
mCardSerialNumber
,
this
);
...
...
src/view/pivcardwidget.h
View file @
e5c8e108
...
...
@@ -40,12 +40,6 @@ private:
void
changePin
(
const
std
::
string
&
keyRef
);
void
setAdminKey
();
private
Q_SLOTS
:
void
generatePIVAuthenticationKey
();
void
generateCardAuthenticationKey
();
void
generateDigitalSignatureKey
();
void
generateKeyManagementKey
();
private:
std
::
string
mCardSerialNumber
;
QLabel
*
mSerialNumber
=
nullptr
,
...
...
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