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
Kleopatra
Commits
24e550bb
Verified
Commit
24e550bb
authored
Sep 09, 2022
by
Ingo Klöcker
Committed by
Ingo Klöcker
Sep 09, 2022
Browse files
Don't show result widget or error message if operation was canceled
GnuPG-bug-id: 6196
parent
3ebfde6d
Pipeline
#229585
passed with stage
in 4 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/view/padwidget.cpp
View file @
24e550bb
...
...
@@ -282,13 +282,15 @@ public:
mProgressBar
->
setVisible
(
false
);
mProgressLabel
->
setVisible
(
false
);
mLastResultWidget
=
new
ResultItemWidget
(
result
);
mLastResultWidget
->
showCloseButton
(
true
);
mStatusLay
->
addWidget
(
mLastResultWidget
);
if
(
!
result
->
error
().
isCanceled
())
{
mLastResultWidget
=
new
ResultItemWidget
(
result
);
mLastResultWidget
->
showCloseButton
(
true
);
mStatusLay
->
addWidget
(
mLastResultWidget
);
connect
(
mLastResultWidget
,
&
ResultItemWidget
::
closeButtonClicked
,
q
,
[
this
]
()
{
removeLastResultItem
();
});
connect
(
mLastResultWidget
,
&
ResultItemWidget
::
closeButtonClicked
,
q
,
[
this
]
()
{
removeLastResultItem
();
});
}
// Check result protocol
if
(
mPGPRB
)
{
...
...
@@ -305,21 +307,21 @@ public:
config
.
writeEntry
(
"wasCMS"
,
proto
==
GpgME
::
CMS
);
}
if
(
result
->
error
()
.
code
()
)
{
if
(
result
->
error
())
{
if
(
!
result
->
errorString
().
isEmpty
())
{
KMessageBox
::
error
(
q
,
result
->
errorString
(),
i18nc
(
"@title"
,
"Error in crypto action"
));
}
return
;
}
mEdit
->
setPlainText
(
QString
::
fromUtf8
(
mOutputData
)
);
mOutputData
.
clear
(
);
mRevertBtn
->
setVisible
(
true
);
const
auto
decryptVerifyResult
=
dynamic_cast
<
const
Kleo
::
Crypto
::
D
ecryptVerifyResult
*>
(
result
.
get
());
if
(
decryptVerifyResult
)
{
updateRecipientsFromResult
(
*
decryptVerifyResult
);
}
else
if
(
!
result
->
error
().
isCanceled
())
{
mEdit
->
setPlainText
(
QString
::
fromUtf8
(
mOutputData
));
mOutputData
.
clear
(
);
mRevertBtn
->
setVisible
(
true
);
const
auto
decryptVerifyResult
=
dynamic_cast
<
const
Kleo
::
Crypto
::
DecryptVerifyResult
*>
(
result
.
get
());
if
(
d
ecryptVerifyResult
)
{
updateRecipientsFromResult
(
*
decryptVerifyResult
)
;
}
}
}
...
...
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