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
KDE PIM Runtime
Commits
82a54448
Commit
82a54448
authored
Oct 15, 2022
by
Laurent Montel
Browse files
Adapt to new api (scripted)
parent
d64a7ee2
Pipeline
#248515
passed with stage
in 12 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
resources/ews/ewsconfigdialog.cpp
View file @
82a54448
...
...
@@ -24,6 +24,7 @@
#include
"ewssettings.h"
#include
"ewssubscriptionwidget.h"
#include
"ui_ewsconfigdialog.h"
#include
<kwidgetsaddons_version.h>
using
StringPair
=
QPair
<
QString
,
QString
>
;
...
...
@@ -332,10 +333,22 @@ void EwsConfigDialog::dialogAccepted()
connect
(
mProgressDialog
,
&
QDialog
::
rejected
,
this
,
&
EwsConfigDialog
::
autoDiscoveryCancelled
);
mAutoDiscoveryJob
->
start
();
if
(
!
mProgressDialog
->
exec
())
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if
(
KMessageBox
::
questionTwoActions
(
this
,
#else
if
(
KMessageBox
::
questionYesNo
(
this
,
i18n
(
"Autodiscovery failed. This can be caused by incorrect parameters. Do you still want to save your settings?"
),
i18n
(
"Exchange server autodiscovery"
))
#endif
i18n
(
"Autodiscovery failed. This can be caused by incorrect parameters. Do you still want to save your settings?"
),
i18n
(
"Exchange server autodiscovery"
),
KStandardGuiItem
::
save
(),
KStandardGuiItem
::
cancel
())
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
==
KMessageBox
::
ButtonCode
::
PrimaryAction
)
{
#else
==
KMessageBox
::
Yes
)
{
#endif
accept
();
}
return
;
...
...
@@ -360,11 +373,22 @@ void EwsConfigDialog::dialogAccepted()
mTryConnectJob
->
start
();
if
(
!
execJob
(
mTryConnectJob
))
{
if
(
!
mTryConnectJobCancelled
)
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if
(
KMessageBox
::
questionTwoActions
(
#else
if
(
KMessageBox
::
questionYesNo
(
#endif
this
,
i18n
(
"Connecting to Exchange failed. This can be caused by incorrect parameters. Do you still want to save your settings?"
),
i18n
(
"Exchange server connection"
))
i18n
(
"Exchange server connection"
),
KStandardGuiItem
::
save
(),
KStandardGuiItem
::
cancel
())
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
==
KMessageBox
::
ButtonCode
::
PrimaryAction
)
{
#else
==
KMessageBox
::
Yes
)
{
#endif
accept
();
}
}
...
...
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