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
KDE PIM Runtime
Commits
1d1da344
Commit
1d1da344
authored
Aug 24, 2021
by
Laurent Montel
😁
Browse files
We can use directly constexpr
parent
e5ebdda3
Pipeline
#76316
failed with stage
in 24 minutes and 41 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
resources/ews/ewsclient/ewsattendee.cpp
View file @
1d1da344
...
...
@@ -31,7 +31,7 @@ static const QString responseTypeNames[] = {QStringLiteral("Unknown"),
QStringLiteral
(
"Accept"
),
QStringLiteral
(
"Decline"
),
QStringLiteral
(
"NoResponseReceived"
)};
Q_CONSTEXPR
unsigned
responseTypeNameCount
=
sizeof
(
responseTypeNames
)
/
sizeof
(
responseTypeNames
[
0
]);
constexpr
unsigned
responseTypeNameCount
=
sizeof
(
responseTypeNames
)
/
sizeof
(
responseTypeNames
[
0
]);
EwsAttendeePrivate
::
EwsAttendeePrivate
()
:
mValid
(
false
)
...
...
resources/ews/ewsclient/ewsgetstreamingeventsrequest.cpp
View file @
1d1da344
...
...
@@ -11,7 +11,7 @@
#include
"ewsclient_debug.h"
#include
"ewsxml.h"
static
Q_CONSTEXPR
uint
respChunkTimeout
=
250
;
/* ms */
static
constexpr
uint
respChunkTimeout
=
250
;
/* ms */
EwsGetStreamingEventsRequest
::
EwsGetStreamingEventsRequest
(
EwsClient
&
client
,
QObject
*
parent
)
:
EwsEventRequestBase
(
client
,
QStringLiteral
(
"GetStreamingEvents"
),
parent
)
...
...
resources/ews/ewsclient/ewsrecurrence.cpp
View file @
1d1da344
...
...
@@ -27,7 +27,7 @@ static const QString dayOfWeekNames[] = {
QStringLiteral
(
"Weekday"
),
QStringLiteral
(
"WeekendDay"
),
};
Q_CONSTEXPR
unsigned
dayOfWeekNameCount
=
sizeof
(
dayOfWeekNames
)
/
sizeof
(
dayOfWeekNames
[
0
]);
constexpr
unsigned
dayOfWeekNameCount
=
sizeof
(
dayOfWeekNames
)
/
sizeof
(
dayOfWeekNames
[
0
]);
static
const
QString
dayOfWeekIndexNames
[]
=
{
QStringLiteral
(
"First"
),
...
...
@@ -36,7 +36,7 @@ static const QString dayOfWeekIndexNames[] = {
QStringLiteral
(
"Fourth"
),
QStringLiteral
(
"Last"
),
};
Q_CONSTEXPR
unsigned
dayOfWeekIndexNameCount
=
sizeof
(
dayOfWeekIndexNames
)
/
sizeof
(
dayOfWeekIndexNames
[
0
]);
constexpr
unsigned
dayOfWeekIndexNameCount
=
sizeof
(
dayOfWeekIndexNames
)
/
sizeof
(
dayOfWeekIndexNames
[
0
]);
static
const
QString
monthNames
[]
=
{
QStringLiteral
(
"January"
),
...
...
@@ -52,7 +52,7 @@ static const QString monthNames[] = {
QStringLiteral
(
"November"
),
QStringLiteral
(
"December"
),
};
Q_CONSTEXPR
unsigned
monthNameCount
=
sizeof
(
monthNames
)
/
sizeof
(
monthNames
[
0
]);
constexpr
unsigned
monthNameCount
=
sizeof
(
monthNames
)
/
sizeof
(
monthNames
[
0
]);
EwsRecurrence
::
EwsRecurrence
()
:
Recurrence
()
...
...
resources/ews/ewsclient/ewsxml.h
View file @
1d1da344
...
...
@@ -22,7 +22,7 @@ public:
typedef
QHash
<
T
,
QVariant
>
ValueHash
;
static
Q_CONSTEXPR
T
Ignore
=
static_cast
<
T
>
(
-
1
);
static
constexpr
T
Ignore
=
static_cast
<
T
>
(
-
1
);
struct
Item
{
Item
()
...
...
resources/ews/ewsfetchfoldersjob.cpp
View file @
1d1da344
...
...
@@ -26,7 +26,7 @@ using namespace Akonadi;
static
const
EwsPropertyField
propPidTagContainerClass
(
0x3613
,
EwsPropTypeString
);
static
Q_CONSTEXPR
int
fetchBatchSize
=
50
;
static
constexpr
int
fetchBatchSize
=
50
;
class
EwsFetchFoldersJobPrivate
:
public
QObject
{
...
...
resources/ews/ewsfetchitemsjob.cpp
View file @
1d1da344
...
...
@@ -23,8 +23,8 @@
using
namespace
Akonadi
;
static
Q_CONSTEXPR
int
listBatchSize
=
100
;
static
Q_CONSTEXPR
int
fetchBatchSize
=
50
;
static
constexpr
int
listBatchSize
=
100
;
static
constexpr
int
fetchBatchSize
=
50
;
/**
* The fetch items job is processed in two stages.
...
...
resources/ews/ewsresource.cpp
View file @
1d1da344
...
...
@@ -1470,7 +1470,7 @@ QString EwsResource::dumpResourceToString() const
{
QString
dump
=
QStringLiteral
(
"item sync queue (%1):
\n
"
).
arg
(
mFetchItemsJobQueue
.
count
());
for
(
const
auto
&
item
:
qAsC
onst
(
mFetchItemsJobQueue
))
{
for
(
const
auto
&
item
:
std
::
as_c
onst
(
mFetchItemsJobQueue
))
{
dump
+=
QStringLiteral
(
" %1:%2
\n
"
).
arg
(
item
.
col
.
id
()).
arg
(
item
.
type
);
}
...
...
resources/ews/ewssubscriptionmanager.cpp
View file @
1d1da344
...
...
@@ -17,11 +17,11 @@
#include
<QPointer>
// TODO: Allow customization
static
Q_CONSTEXPR
uint
pollInterval
=
10
;
/* seconds */
static
constexpr
uint
pollInterval
=
10
;
/* seconds */
static
Q_CONSTEXPR
uint
streamingTimeout
=
30
;
/* minutes */
static
constexpr
uint
streamingTimeout
=
30
;
/* minutes */
static
Q_CONSTEXPR
uint
streamingConnTimeout
=
60
;
/* seconds */
static
constexpr
uint
streamingConnTimeout
=
60
;
/* seconds */
EwsSubscriptionManager
::
EwsSubscriptionManager
(
EwsClient
&
client
,
const
EwsId
&
rootId
,
EwsSettings
*
settings
,
QObject
*
parent
)
:
QObject
(
parent
)
...
...
resources/ews/tags/ewstagstore.cpp
View file @
1d1da344
...
...
@@ -17,8 +17,8 @@
using
namespace
Akonadi
;
static
Q_CONSTEXPR
quint32
TagDataVer1
=
1
;
static
Q_CONSTEXPR
QDataStream
::
Version
TagDataVer1StreamVer
=
QDataStream
::
Qt_5_4
;
static
constexpr
quint32
TagDataVer1
=
1
;
static
constexpr
QDataStream
::
Version
TagDataVer1StreamVer
=
QDataStream
::
Qt_5_4
;
EwsTagStore
::
EwsTagStore
(
QObject
*
parent
)
:
QObject
(
parent
)
...
...
resources/ews/test/fakeserver/fakeewsconnection.cpp
View file @
1d1da344
...
...
@@ -26,7 +26,7 @@ static const QHash<uint, QString> responseCodes = {
{
500
,
QStringLiteral
(
"Internal Server Error"
)},
};
static
Q_CONSTEXPR
int
streamingEventsHeartbeatIntervalSeconds
=
5
;
static
constexpr
int
streamingEventsHeartbeatIntervalSeconds
=
5
;
FakeEwsConnection
::
FakeEwsConnection
(
QTcpSocket
*
sock
,
FakeEwsServer
*
parent
)
:
QObject
(
parent
)
...
...
Write
Preview
Supports
Markdown
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