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
Akonadi
Commits
58419bd8
Commit
58419bd8
authored
Dec 29, 2021
by
Laurent Montel
Browse files
Fix more compile error against qt6
parent
6bc280c2
Pipeline
#115854
passed with stage
in 7 minutes and 49 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/private/dbus.cpp
View file @
58419bd8
...
...
@@ -56,8 +56,11 @@ std::optional<DBus::AgentService> DBus::parseAgentServiceName(const QString &ser
if
(
!
serviceName
.
startsWith
(
AKONADI_DBUS_SERVER_SERVICE
"."
))
{
return
std
::
nullopt
;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
auto
parts
=
serviceName
.
midRef
(
QStringView
(
AKONADI_DBUS_SERVER_SERVICE
"."
).
length
()).
split
(
QLatin1Char
(
'.'
));
#else
const
auto
parts
=
QStringView
(
serviceName
).
mid
(
QStringView
(
AKONADI_DBUS_SERVER_SERVICE
"."
).
length
()).
split
(
QLatin1Char
(
'.'
));
#endif
if
((
parts
.
size
()
==
2
&&
!
Akonadi
::
Instance
::
hasIdentifier
())
||
(
parts
.
size
()
==
3
&&
Akonadi
::
Instance
::
hasIdentifier
()
&&
Akonadi
::
Instance
::
identifier
()
==
parts
.
at
(
2
)))
{
// switch on parts.at( 0 )
...
...
@@ -117,7 +120,11 @@ std::optional<QString> DBus::parseInstanceIdentifier(const QString &serviceName)
}
if
(
serviceName
.
startsWith
(
QStringView
{
AKONADI_DBUS_SERVER_SERVICE
}))
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
auto
split
=
serviceName
.
splitRef
(
QLatin1Char
(
'.'
));
#else
const
auto
split
=
QStringView
(
serviceName
).
split
(
QLatin1Char
(
'.'
));
#endif
if
(
split
.
size
()
<=
3
)
{
return
std
::
nullopt
;
}
...
...
src/private/imapset.cpp
View file @
58419bd8
...
...
@@ -160,13 +160,13 @@ ImapSet::ImapSet(Id id)
{
add
(
QVector
<
Id
>
()
<<
id
);
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ImapSet
::
ImapSet
(
const
QVector
<
qint64
>
&
ids
)
:
d
(
new
ImapSetPrivate
)
{
add
(
ids
);
}
#endif
ImapSet
::
ImapSet
(
const
QList
<
qint64
>
&
ids
)
:
d
(
new
ImapSetPrivate
)
{
...
...
@@ -208,12 +208,12 @@ bool ImapSet::operator==(const ImapSet &other) const
{
return
d
->
intervals
==
other
.
d
->
intervals
;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void
ImapSet
::
add
(
const
QVector
<
Id
>
&
values
)
{
d
->
add
(
values
);
}
#endif
void
ImapSet
::
add
(
const
QList
<
Id
>
&
values
)
{
d
->
add
(
values
);
...
...
src/private/imapset_p.h
View file @
58419bd8
...
...
@@ -147,7 +147,9 @@ public:
ImapSet
(
qint64
Id
);
// krazy:exclude=explicit
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ImapSet
(
const
QVector
<
qint64
>
&
ids
);
// krazy:exclude=explicit
#endif
ImapSet
(
const
QList
<
qint64
>
&
ids
);
// krazy:exclude=explicit
...
...
@@ -181,7 +183,9 @@ public:
No interval merging is performed.
@param values List of positive integer numbers in arbitrary order
*/
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void
add
(
const
QVector
<
Id
>
&
values
);
#endif
void
add
(
const
QList
<
Id
>
&
values
);
/**
...
...
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