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
7cc57d6a
Commit
7cc57d6a
authored
Sep 11, 2021
by
Laurent Montel
😁
Browse files
Port some deprecated methods
parent
6e3071bc
Pipeline
#80036
passed with stage
in 13 minutes and 59 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/agentbase/resourcebase.cpp
View file @
7cc57d6a
...
...
@@ -746,7 +746,9 @@ void ResourceBase::requestItemDelivery(const QVector<qint64> &uids, const QByteA
return
Item
{
uid
};
})
|
Actions
::
toQVector
;
d
->
scheduler
->
scheduleItemsFetch
(
items
,
QSet
<
QByteArray
>::
fromList
(
parts
),
message
());
const
QSet
<
QByteArray
>
partSet
=
QSet
<
QByteArray
>
(
parts
.
begin
(),
parts
.
end
());
d
->
scheduler
->
scheduleItemsFetch
(
items
,
partSet
,
message
());
}
void
ResourceBase
::
collectionsRetrieved
(
const
Collection
::
List
&
collections
)
...
...
src/server/search/searchmanager.cpp
View file @
7cc57d6a
...
...
@@ -293,7 +293,7 @@ void SearchManager::updateSearchImpl(const Collection &collection)
}
// Query all plugins for search results
const
QByteArray
id
=
"searchUpdate-"
+
QByteArray
::
number
(
QDateTime
::
currentDateTimeUtc
().
to
Time_t
());
const
QByteArray
id
=
"searchUpdate-"
+
QByteArray
::
number
(
QDateTime
::
currentDateTimeUtc
().
to
SecsSinceEpoch
());
SearchRequest
request
(
id
,
*
this
,
mAgentSearchManager
);
request
.
setCollections
(
queryCollections
);
request
.
setMimeTypes
(
queryMimeTypes
);
...
...
src/server/storage/dbinitializer.cpp
View file @
7cc57d6a
...
...
@@ -79,7 +79,7 @@ bool DbInitializer::run()
// Now finally check and set the generation identifier if necessary
SchemaVersion
version
=
SchemaVersion
::
retrieveAll
().
at
(
0
);
if
(
version
.
generation
()
==
0
)
{
version
.
setGeneration
(
QDateTime
::
currentDateTimeUtc
().
to
Time_t
());
version
.
setGeneration
(
QDateTime
::
currentDateTimeUtc
().
to
SecsSinceEpoch
());
version
.
update
();
qCDebug
(
AKONADISERVER_LOG
)
<<
"Generation:"
<<
version
.
generation
();
...
...
src/widgets/standardactionmanager.cpp
View file @
7cc57d6a
...
...
@@ -1534,14 +1534,20 @@ public:
const
bool
isItemAction
=
(
type
==
CopyItemToMenu
||
type
==
MoveItemToMenu
);
const
bool
isCollectionAction
=
(
type
==
CopyCollectionToMenu
||
type
==
MoveCollectionToMenu
);
const
bool
canContainRequiredMimeTypes
=
collection
.
contentMimeTypes
().
toSet
().
intersects
(
mimeTypes
);
const
auto
contentMimeTypesList
{
collection
.
contentMimeTypes
()};
const
QSet
<
QString
>
contentMimeTypesSet
=
QSet
<
QString
>
(
contentMimeTypesList
.
cbegin
(),
contentMimeTypesList
.
cend
());
const
bool
canContainRequiredMimeTypes
=
contentMimeTypesSet
.
intersects
(
mimeTypes
);
const
bool
canCreateNewItems
=
(
collection
.
rights
()
&
Collection
::
CanCreateItem
);
const
bool
canCreateNewCollections
=
(
collection
.
rights
()
&
Collection
::
CanCreateCollection
);
const
bool
canContainCollections
=
collection
.
contentMimeTypes
().
contains
(
Collection
::
mimeType
())
||
collection
.
contentMimeTypes
().
contains
(
Collection
::
virtualMimeType
());
const
bool
resourceAllowsRequiredMimeTypes
=
AgentManager
::
self
()
->
instance
(
collection
.
resource
()).
type
().
mimeTypes
().
toSet
().
contains
(
mimeTypes
);
const
auto
mimeTypesList
{
AgentManager
::
self
()
->
instance
(
collection
.
resource
()).
type
().
mimeTypes
()};
const
QSet
<
QString
>
mimeTypesListSet
=
QSet
<
QString
>
(
mimeTypesList
.
cbegin
(),
mimeTypesList
.
cend
());
const
bool
resourceAllowsRequiredMimeTypes
=
mimeTypesListSet
.
contains
(
mimeTypes
);
const
bool
isReadOnlyForItems
=
(
isItemAction
&&
(
!
canCreateNewItems
||
!
canContainRequiredMimeTypes
));
const
bool
isReadOnlyForCollections
=
(
isCollectionAction
&&
(
!
canCreateNewCollections
||
!
canContainCollections
||
!
resourceAllowsRequiredMimeTypes
));
...
...
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