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 Mime
Commits
8a54b26d
Commit
8a54b26d
authored
Sep 14, 2020
by
Laurent Montel
😁
Browse files
Prepare fixing bug 424184 (Wrong message marked when using message
window)
parent
868d499f
Pipeline
#34249
passed with stage
in 15 minutes and 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
8a54b26d
cmake_minimum_required
(
VERSION 3.5
)
set
(
PIM_VERSION
"5.15.4
0
"
)
set
(
PIM_VERSION
"5.15.4
1
"
)
project
(
Akonadi-Mime VERSION
${
PIM_VERSION
}
)
# ECM setup
...
...
src/standardmailactionmanager.cpp
View file @
8a54b26d
...
...
@@ -483,18 +483,8 @@ public:
action
->
setData
(
data
);
}
void
slotMarkAs
(
)
void
markItemsAs
(
QByteArray
typeStr
,
const
Akonadi
::
Item
::
List
&
items
,
bool
checkIntercept
=
true
)
{
const
Akonadi
::
Item
::
List
items
=
mGenericManager
->
selectedItems
();
if
(
items
.
isEmpty
())
{
return
;
}
const
QAction
*
action
=
qobject_cast
<
QAction
*>
(
mParent
->
sender
());
Q_ASSERT
(
action
);
QByteArray
typeStr
=
action
->
data
().
toByteArray
();
qCDebug
(
AKONADIMIME_LOG
)
<<
"Mark mail as: "
<<
typeStr
;
bool
invert
=
false
;
...
...
@@ -517,7 +507,7 @@ public:
type
=
MarkMailAsImportant
;
}
if
(
mInterceptedActions
.
contains
(
type
))
{
if
(
mInterceptedActions
.
contains
(
type
)
&&
checkIntercept
)
{
return
;
}
...
...
@@ -525,17 +515,23 @@ public:
command
->
execute
();
}
void
slotMarkA
llA
s
()
void
slotMarkAs
()
{
const
Akonadi
::
Collection
::
List
collection
s
=
mGenericManager
->
selected
Collection
s
();
if
(
collection
s
.
isEmpty
())
{
const
Akonadi
::
Item
::
List
item
s
=
mGenericManager
->
selected
Item
s
();
if
(
item
s
.
isEmpty
())
{
return
;
}
const
QAction
*
action
=
qobject_cast
<
QAction
*>
(
mParent
->
sender
());
Q_ASSERT
(
action
);
QByteArray
typeStr
=
action
->
data
().
toByteArray
();
const
QByteArray
typeStr
=
action
->
data
().
toByteArray
();
markItemsAs
(
typeStr
,
items
,
true
);
}
void
markAllItemsAs
(
QByteArray
typeStr
,
const
Akonadi
::
Collection
::
List
&
collections
,
bool
checkIntercept
=
true
)
{
qCDebug
(
AKONADIMIME_LOG
)
<<
"Mark all as: "
<<
typeStr
;
...
...
@@ -564,7 +560,7 @@ public:
type
=
MarkAllMailAsImportant
;
}
if
(
mInterceptedActions
.
contains
(
type
))
{
if
(
mInterceptedActions
.
contains
(
type
)
&&
checkIntercept
)
{
return
;
}
...
...
@@ -572,6 +568,19 @@ public:
command
->
execute
();
}
void
slotMarkAllAs
()
{
const
Akonadi
::
Collection
::
List
collections
=
mGenericManager
->
selectedCollections
();
if
(
collections
.
isEmpty
())
{
return
;
}
const
QAction
*
action
=
qobject_cast
<
QAction
*>
(
mParent
->
sender
());
Q_ASSERT
(
action
);
const
QByteArray
typeStr
=
action
->
data
().
toByteArray
();
markAllItemsAs
(
typeStr
,
collections
,
true
);
}
void
slotMoveToTrash
()
{
if
(
mInterceptedActions
.
contains
(
StandardMailActionManager
::
MoveToTrash
))
{
...
...
@@ -1011,4 +1020,14 @@ Akonadi::StandardActionManager *StandardMailActionManager::standardActionManager
return
d
->
mGenericManager
;
}
void
StandardMailActionManager
::
markItemsAs
(
const
QByteArray
&
typeStr
,
const
Item
::
List
&
items
,
bool
checkIntercept
)
{
d
->
markItemsAs
(
typeStr
,
items
,
checkIntercept
);
}
void
StandardMailActionManager
::
markAllItemsAs
(
const
QByteArray
&
typeStr
,
const
Collection
::
List
&
collections
,
bool
checkIntercept
)
{
d
->
markAllItemsAs
(
typeStr
,
collections
,
checkIntercept
);
}
#include "moc_standardmailactionmanager.cpp"
src/standardmailactionmanager.h
View file @
8a54b26d
...
...
@@ -189,6 +189,9 @@ public:
void
setCollectionPropertiesPageNames
(
const
QStringList
&
names
);
Akonadi
::
StandardActionManager
*
standardActionManager
()
const
;
void
markItemsAs
(
const
QByteArray
&
typeStr
,
const
Akonadi
::
Item
::
List
&
items
,
bool
checkIntercept
=
true
);
void
markAllItemsAs
(
const
QByteArray
&
typeStr
,
const
Akonadi
::
Collection
::
List
&
collections
,
bool
checkIntercept
=
true
);
Q_SIGNALS:
/**
* This signal is emitted whenever the action state has been updated.
...
...
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