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
PIM MailCommon
Commits
818a3684
Commit
818a3684
authored
Oct 05, 2020
by
Laurent Montel
😁
Browse files
Allow to use method from expery widget too
parent
97364d72
Pipeline
#36481
passed with stage
in 34 minutes and 13 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
818a3684
cmake_minimum_required
(
VERSION 3.5
)
set
(
PIM_VERSION
"5.15.4
7
"
)
set
(
PIM_VERSION
"5.15.4
8
"
)
project
(
mailcommon VERSION
${
PIM_VERSION
}
)
...
...
src/collectionpage/collectionexpirypage.cpp
View file @
818a3684
...
...
@@ -33,8 +33,7 @@ CollectionExpiryPage::~CollectionExpiryPage()
bool
CollectionExpiryPage
::
canHandle
(
const
Akonadi
::
Collection
&
col
)
const
{
QSharedPointer
<
FolderSettings
>
fd
=
FolderSettings
::
forCollection
(
col
,
false
);
return
fd
->
canDeleteMessages
()
&&
!
fd
->
isStructural
()
&&
!
MailCommon
::
Util
::
isVirtualCollection
(
col
);
return
CollectionExpiryWidget
::
canHandle
(
col
);
}
void
CollectionExpiryPage
::
init
()
...
...
src/collectionpage/collectionexpirywidget.cpp
View file @
818a3684
...
...
@@ -244,3 +244,9 @@ void CollectionExpiryWidget::save(Akonadi::Collection &collection, bool saveSett
const
CollectionExpirySettings
collectionExpirySettings
=
settings
();
save
(
collectionExpirySettings
,
collection
,
saveSettings
,
expireNow
);
}
bool
CollectionExpiryWidget
::
canHandle
(
const
Akonadi
::
Collection
&
col
)
{
QSharedPointer
<
FolderSettings
>
fd
=
FolderSettings
::
forCollection
(
col
,
false
);
return
fd
->
canDeleteMessages
()
&&
!
fd
->
isStructural
()
&&
!
MailCommon
::
Util
::
isVirtualCollection
(
col
);
}
src/collectionpage/collectionexpirywidget.h
View file @
818a3684
...
...
@@ -50,6 +50,7 @@ public:
void
save
(
const
CollectionExpirySettings
&
collectionExpirySettings
,
Akonadi
::
Collection
&
collection
,
bool
saveSettings
,
bool
expireNow
);
Q_REQUIRED_RESULT
CollectionExpirySettings
settings
()
const
;
void
hideExpireNowButton
();
static
Q_REQUIRED_RESULT
bool
canHandle
(
const
Akonadi
::
Collection
&
col
);
Q_SIGNALS:
void
saveAndExpireRequested
();
void
configChanged
(
bool
changed
=
true
);
...
...
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