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
38a05e93
Commit
38a05e93
authored
Feb 03, 2022
by
Laurent Montel
😁
Browse files
Make sure helper apps we start are in path
parent
4330eb71
Pipeline
#132237
passed with stage
in 3 minutes and 57 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/configuredialog/configureaccountpage.cpp
View file @
38a05e93
...
...
@@ -215,7 +215,7 @@ void AccountsPageReceivingTab::slotAddMailAccount()
const
QStringList
lst
=
{
QStringLiteral
(
"--type"
),
QStringLiteral
(
"message/rfc822"
)};
const
QString
path
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"accountwizard"
));
if
(
!
QProcess
::
startDetached
(
path
,
lst
))
{
if
(
path
.
isEmpty
()
||
!
QProcess
::
startDetached
(
path
,
lst
))
{
KMessageBox
::
error
(
this
,
i18n
(
"Could not start the account wizard. "
"Please make sure you have AccountWizard properly installed."
),
...
...
src/editor/kmcomposerwin.cpp
View file @
38a05e93
...
...
@@ -3717,9 +3717,15 @@ void KMComposerWin::slotRecipientLineIconClicked(MessageComposer::RecipientLineN
const
auto
data
=
line
->
data
().
dynamicCast
<
MessageComposer
::
Recipient
>
();
if
(
!
data
->
key
().
isNull
())
{
QProcess
::
startDetached
(
QStringLiteral
(
"kleopatra"
),
{
QStringLiteral
(
"--query"
),
QString
::
fromLatin1
(
data
->
key
().
primaryFingerprint
()),
QStringLiteral
(
"--parent-windowid"
),
QString
::
number
(
winId
())});
const
QString
exec
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"kleopatra"
));
if
(
exec
.
isEmpty
()
||
!
QProcess
::
startDetached
(
exec
,
{
QStringLiteral
(
"--query"
),
QString
::
fromLatin1
(
data
->
key
().
primaryFingerprint
()),
QStringLiteral
(
"--parent-windowid"
),
QString
::
number
(
winId
())}))
{
qCWarning
(
KMAIL_LOG
)
<<
"Unable to execute kleopatra"
;
}
}
}
...
...
src/kmlaunchexternalcomponent.cpp
View file @
38a05e93
...
...
@@ -83,7 +83,8 @@ void KMLaunchExternalComponent::slotConfigureFollowupReminder()
void
KMLaunchExternalComponent
::
slotStartCertManager
()
{
if
(
!
QProcess
::
startDetached
(
QStringLiteral
(
"kleopatra"
),
QStringList
()))
{
const
QString
exec
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"kleopatra"
));
if
(
exec
.
isEmpty
()
||
!
QProcess
::
startDetached
(
exec
,
QStringList
()))
{
KMessageBox
::
error
(
mParentWidget
,
i18n
(
"Could not start certificate manager; "
"please make sure you have Kleopatra properly installed."
),
...
...
@@ -94,7 +95,7 @@ void KMLaunchExternalComponent::slotStartCertManager()
void
KMLaunchExternalComponent
::
slotImportWizard
()
{
const
QString
path
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"akonadiimportwizard"
));
if
(
!
QProcess
::
startDetached
(
path
,
QStringList
()))
{
if
(
path
.
isEmpty
()
||
!
QProcess
::
startDetached
(
path
,
QStringList
()))
{
KMessageBox
::
error
(
mParentWidget
,
i18n
(
"Could not start the import wizard. "
"Please make sure you have ImportWizard properly installed."
),
...
...
@@ -105,7 +106,7 @@ void KMLaunchExternalComponent::slotImportWizard()
void
KMLaunchExternalComponent
::
slotExportData
()
{
const
QString
path
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"pimdataexporter"
));
if
(
!
QProcess
::
startDetached
(
path
,
QStringList
()))
{
if
(
path
.
isEmpty
()
||
!
QProcess
::
startDetached
(
path
,
QStringList
()))
{
KMessageBox
::
error
(
mParentWidget
,
i18n
(
"Could not start
\"
PIM Data Exporter
\"
program. "
"Please check your installation."
),
...
...
@@ -125,7 +126,7 @@ void KMLaunchExternalComponent::slotImport()
{
const
QStringList
lst
=
{
QStringLiteral
(
"--mode"
),
QStringLiteral
(
"manual"
)};
const
QString
path
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"akonadiimportwizard"
));
if
(
!
QProcess
::
startDetached
(
path
,
lst
))
{
if
(
path
.
isEmpty
()
||
!
QProcess
::
startDetached
(
path
,
lst
))
{
KMessageBox
::
error
(
mParentWidget
,
i18n
(
"Could not start the ImportWizard. "
"Please make sure you have ImportWizard properly installed."
),
...
...
@@ -138,7 +139,7 @@ void KMLaunchExternalComponent::slotAccountWizard()
const
QStringList
lst
=
{
QStringLiteral
(
"--type"
),
QStringLiteral
(
"message/rfc822"
)};
const
QString
path
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"accountwizard"
));
if
(
!
QProcess
::
startDetached
(
path
,
lst
))
{
if
(
path
.
isEmpty
()
||
!
QProcess
::
startDetached
(
path
,
lst
))
{
KMessageBox
::
error
(
mParentWidget
,
i18n
(
"Could not start the account wizard. "
"Please make sure you have AccountWizard properly installed."
),
...
...
src/kmmainwidget.cpp
View file @
38a05e93
...
...
@@ -307,7 +307,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCo
KGuiItem
(
i18nc
(
"@action:button"
,
"Do Not Import"
),
QStringLiteral
(
"dialog-cancel"
)));
if
(
answer
==
KMessageBox
::
Yes
)
{
const
QString
path
=
QStandardPaths
::
findExecutable
(
QStringLiteral
(
"akonadiimportwizard"
));
if
(
!
QProcess
::
startDetached
(
path
,
QStringList
()))
{
if
(
path
.
isEmpty
()
||
!
QProcess
::
startDetached
(
path
,
QStringList
()))
{
KMessageBox
::
error
(
this
,
i18n
(
"Could not start the import wizard. "
"Please check your installation."
),
...
...
Laurent Montel
😁
@mlaurent
mentioned in commit
582c5910
·
Feb 03, 2022
mentioned in commit
582c5910
mentioned in commit 582c5910bfc8791fce8321cde92237b87252f116
Toggle commit list
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