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
Akonadi
Commits
595b58fb
Commit
595b58fb
authored
Feb 20, 2022
by
Laurent Montel
😁
Browse files
Fix some qtc6 compile error
parent
0c743410
Pipeline
#140079
passed with stage
in 7 minutes and 58 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/agentbase/agentbase.cpp
View file @
595b58fb
...
...
@@ -29,7 +29,7 @@
#include <KAboutData>
#include <kcoreaddons_version.h>
#if
KCOREADDONS
_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if
QT
_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <Kdelibs4ConfigMigrator>
#endif
...
...
@@ -340,7 +340,7 @@ AgentBasePrivate::~AgentBasePrivate()
void
AgentBasePrivate
::
init
()
{
Q_Q
(
AgentBase
);
#if
KCOREADDONS
_VERSION < QT_VERSION_CHECK(6, 0, 0)
#if
QT
_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator
migrate
(
mId
);
migrate
.
setConfigFiles
(
QStringList
()
<<
QStringLiteral
(
"%1rc"
).
arg
(
mId
));
migrate
.
migrate
();
...
...
src/agentbase/resourcebase.cpp
View file @
595b58fb
...
...
@@ -845,11 +845,19 @@ namespace
bool
sortCollectionsForSync
(
const
Collection
&
l
,
const
Collection
&
r
)
{
const
auto
lType
=
l
.
hasAttribute
<
SpecialCollectionAttribute
>
()
?
l
.
attribute
<
SpecialCollectionAttribute
>
()
->
collectionType
()
:
QByteArray
();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
bool
lInbox
=
(
lType
==
"inbox"
)
||
(
l
.
remoteId
().
midRef
(
1
).
compare
(
QLatin1String
(
"inbox"
),
Qt
::
CaseInsensitive
)
==
0
);
#else
const
bool
lInbox
=
(
lType
==
"inbox"
)
||
(
QStringView
(
l
.
remoteId
()).
mid
(
1
).
compare
(
QLatin1String
(
"inbox"
),
Qt
::
CaseInsensitive
)
==
0
);
#endif
const
bool
lFav
=
l
.
hasAttribute
<
FavoriteCollectionAttribute
>
();
const
auto
rType
=
r
.
hasAttribute
<
SpecialCollectionAttribute
>
()
?
r
.
attribute
<
SpecialCollectionAttribute
>
()
->
collectionType
()
:
QByteArray
();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const
bool
rInbox
=
(
rType
==
"inbox"
)
||
(
r
.
remoteId
().
midRef
(
1
).
compare
(
QLatin1String
(
"inbox"
),
Qt
::
CaseInsensitive
)
==
0
);
#else
const
bool
rInbox
=
(
rType
==
"inbox"
)
||
(
QStringView
(
r
.
remoteId
()).
mid
(
1
).
compare
(
QLatin1String
(
"inbox"
),
Qt
::
CaseInsensitive
)
==
0
);
#endif
const
bool
rFav
=
r
.
hasAttribute
<
FavoriteCollectionAttribute
>
();
// inbox is always first
...
...
src/core/jobs/trashjob.cpp
View file @
595b58fb
...
...
@@ -117,7 +117,11 @@ void TrashJobPrivate::setAttribute(const Akonadi::Item::List &list)
{
Q_Q
(
TrashJob
);
Item
::
List
items
=
list
;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QMutableVectorIterator
<
Item
>
i
(
items
);
#else
QMutableListIterator
<
Item
>
i
(
items
);
#endif
while
(
i
.
hasNext
())
{
const
Item
&
item
=
i
.
next
();
auto
eda
=
new
EntityDeletedAttribute
();
...
...
@@ -221,8 +225,11 @@ void TrashJobPrivate::itemsReceived(const Akonadi::Item::List &items)
}
Item
::
List
toDelete
;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QVectorIterator
<
Item
>
i
(
items
);
#else
QListIterator
<
Item
>
i
(
items
);
#endif
while
(
i
.
hasNext
())
{
const
Item
&
item
=
i
.
next
();
if
(
item
.
hasAttribute
<
EntityDeletedAttribute
>
())
{
...
...
src/core/jobs/trashrestorejob.cpp
View file @
595b58fb
...
...
@@ -272,7 +272,11 @@ void TrashRestoreJobPrivate::removeAttribute(const Akonadi::Item::List &list)
{
Q_Q
(
TrashRestoreJob
);
Item
::
List
items
=
list
;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QMutableVectorIterator
<
Item
>
i
(
items
);
#else
QMutableListIterator
<
Item
>
i
(
items
);
#endif
while
(
i
.
hasNext
())
{
Item
&
item
=
i
.
next
();
item
.
removeAttribute
<
EntityDeletedAttribute
>
();
...
...
src/server/CMakeLists.txt
View file @
595b58fb
...
...
@@ -294,7 +294,7 @@ install(TARGETS akonadiserver
install
(
FILES
storage/mysql-global.conf
storage/mysql-global-mobile.conf
DESTINATION
${
CONFIG
_INSTALL_DIR
}
/akonadi
DESTINATION
${
KDE
_INSTALL_
CONF
DIR
}
/akonadi
)
install
(
FILES
...
...
src/server/handler/collectionfetchhandler.cpp
View file @
595b58fb
...
...
@@ -303,7 +303,7 @@ void CollectionFetchHandler::retrieveCollections(const Collection &topParent, in
QVariantList
mimeTypeIds
;
QVariantList
attributeIds
;
QVariantList
ancestorIds
;
const
int
collectionSize
{
mCollections
.
size
()};
const
auto
collectionSize
{
mCollections
.
size
()};
mimeTypeIds
.
reserve
(
collectionSize
);
attributeIds
.
reserve
(
collectionSize
);
// We'd only require the non-leaf collections, but we don't know which those are, so we take all.
...
...
src/shared/CMakeLists.txt
View file @
595b58fb
...
...
@@ -10,7 +10,7 @@ target_sources(akonadi_shared PRIVATE
akdebug.h
akremotelog.h
)
set_property
(
TARGET akonadi_shared PROPERTY POSITION_INDEPENDENT_CODE ON
)
if
(
COMPILE_WITH_UNITY_CMAKE_SUPPORT
)
set_target_properties
(
akonadi_shared PROPERTIES UNITY_BUILD ON
)
endif
()
...
...
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