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
KMail
Commits
aab2412c
Commit
aab2412c
authored
Aug 24, 2021
by
Laurent Montel
😁
Browse files
Generate actions from plugins
parent
fd464b6c
Pipeline
#76361
passed with stage
in 23 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/plugininterface/kmailplugincheckbeforedeletingmanagerinterface.cpp
View file @
aab2412c
...
...
@@ -35,6 +35,7 @@ void KMailPluginCheckBeforeDeletingManagerInterface::initializePlugins()
auto
interface
=
static_cast
<
MessageViewer
::
MessageViewerCheckBeforeDeletingInterface
*>
(
plugin
->
createInterface
(
this
));
interface
->
setParentWidget
(
mParentWidget
);
interface
->
createActions
(
mActionCollection
);
mActions
.
append
(
interface
->
actions
());
mListPluginInterface
.
append
(
interface
);
}
}
...
...
@@ -51,6 +52,11 @@ void KMailPluginCheckBeforeDeletingManagerInterface::setActionCollection(KAction
mActionCollection
=
ac
;
}
const
QList
<
QAction
*>
KMailPluginCheckBeforeDeletingManagerInterface
::
actions
()
const
{
return
mActions
;
}
void
KMailPluginCheckBeforeDeletingManagerInterface
::
setParentWidget
(
QWidget
*
newParentWidget
)
{
mParentWidget
=
newParentWidget
;
...
...
src/plugininterface/kmailplugincheckbeforedeletingmanagerinterface.h
View file @
aab2412c
...
...
@@ -13,6 +13,7 @@ namespace MessageViewer
{
class
MessageViewerCheckBeforeDeletingInterface
;
}
class
QAction
;
class
KActionCollection
;
class
KMailPluginCheckBeforeDeletingManagerInterface
:
public
QObject
{
...
...
@@ -29,7 +30,10 @@ public:
void
setActionCollection
(
KActionCollection
*
ac
);
const
QList
<
QAction
*>
actions
()
const
;
private:
QList
<
QAction
*>
mActions
;
QVector
<
MessageViewer
::
MessageViewerCheckBeforeDeletingInterface
*>
mListPluginInterface
;
QWidget
*
mParentWidget
=
nullptr
;
KActionCollection
*
mActionCollection
=
nullptr
;
...
...
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