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
d4d1f77d
Commit
d4d1f77d
authored
Oct 12, 2022
by
Laurent Montel
Browse files
Fix some compile error (qt6)
parent
ea055c52
Changes
2
Hide whitespace changes
Inline
Side-by-side
resources/ews/ewsabstractchunkedjob.h
View file @
d4d1f77d
...
...
@@ -57,7 +57,7 @@ template<typename Req, typename ReqItem, typename RespItem>
template
<
typename
ReqSetupFn
,
typename
RespGetFn
,
typename
ProgressFn
,
typename
ResultFn
>
void
EwsAbstractChunkedJob
<
Req
,
ReqItem
,
RespItem
>::
start
(
ReqSetupFn
reqSetupFn
,
RespGetFn
respGetFn
,
ProgressFn
progressFn
,
ResultFn
resultFn
)
{
int
itemsToDo
=
qMin
(
mItems
.
size
()
-
mItemsDone
,
mChunkSize
);
int
itemsToDo
=
qMin
<
int
>
(
mItems
.
size
()
-
mItemsDone
,
mChunkSize
);
if
(
itemsToDo
==
0
)
{
resultFn
(
true
,
QString
());
return
;
...
...
resources/ews/ewsclient/auth/ewsoauth.cpp
View file @
d4d1f77d
...
...
@@ -118,8 +118,11 @@ public:
~
EwsOAuthPrivate
()
override
=
default
;
bool
authenticate
(
bool
interactive
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void
modifyParametersFunction
(
QAbstractOAuth
::
Stage
stage
,
QVariantMap
*
parameters
);
#else
void
modifyParametersFunction
(
QAbstractOAuth
::
Stage
stage
,
QMultiMap
<
QString
,
QVariant
>
*
parameters
);
#endif
void
authorizeWithBrowser
(
const
QUrl
&
url
);
void
redirectUriIntercepted
(
const
QUrl
&
url
);
void
granted
();
...
...
@@ -280,7 +283,7 @@ void EwsOAuthRequestInterceptor::setPKeyAuthInputArguments(const QString &pkeyCe
EwsOAuthPrivate
::
EwsOAuthPrivate
(
EwsOAuth
*
parent
,
const
QString
&
email
,
const
QString
&
appId
,
const
QString
&
redirectUri
)
:
QObject
(
nullptr
)
,
mWebView
(
nullptr
)
,
mWebView
(
(
QWidget
*
)
nullptr
)
,
mWebProfile
()
,
mWebPage
(
&
mWebProfile
)
,
mReplyHandler
(
this
,
redirectUri
)
...
...
@@ -298,10 +301,15 @@ EwsOAuthPrivate::EwsOAuthPrivate(EwsOAuth *parent, const QString &email, const Q
mWebProfile
.
installUrlSchemeHandler
(
"urn"
,
&
mSchemeHandler
);
mWebView
.
setPage
(
&
mWebPage
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
mOAuth2
.
setModifyParametersFunction
([
&
](
QAbstractOAuth
::
Stage
stage
,
QVariantMap
*
parameters
)
{
modifyParametersFunction
(
stage
,
parameters
);
});
#else
mOAuth2
.
setModifyParametersFunction
([
&
](
QAbstractOAuth
::
Stage
stage
,
QMultiMap
<
QString
,
QVariant
>
*
parameters
)
{
modifyParametersFunction
(
stage
,
parameters
);
});
#endif
connect
(
&
mOAuth2
,
&
QOAuth2AuthorizationCodeFlow
::
authorizeWithBrowser
,
this
,
&
EwsOAuthPrivate
::
authorizeWithBrowser
);
connect
(
&
mOAuth2
,
&
QOAuth2AuthorizationCodeFlow
::
granted
,
this
,
&
EwsOAuthPrivate
::
granted
);
connect
(
&
mOAuth2
,
&
QOAuth2AuthorizationCodeFlow
::
error
,
this
,
&
EwsOAuthPrivate
::
error
);
...
...
@@ -328,7 +336,11 @@ bool EwsOAuthPrivate::authenticate(bool interactive)
}
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void
EwsOAuthPrivate
::
modifyParametersFunction
(
QAbstractOAuth
::
Stage
stage
,
QVariantMap
*
parameters
)
#else
void
EwsOAuthPrivate
::
modifyParametersFunction
(
QAbstractOAuth
::
Stage
stage
,
QMultiMap
<
QString
,
QVariant
>
*
parameters
)
#endif
{
switch
(
stage
)
{
case
QAbstractOAuth
::
Stage
::
RequestingAccessToken
:
...
...
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