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
OpenFlipper-Free
OpenFlipper
Commits
445feac4
Commit
445feac4
authored
Apr 27, 2017
by
Jan Möbius
Browse files
Merge branch 'fixDestructorInvocation' into 'master'
plugin cleanup See merge request
!5
parents
b64f4c56
d19631dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
BasePlugin/ToolboxInterface.hh
View file @
445feac4
...
...
@@ -96,6 +96,8 @@ class ToolboxInterface {
/** \brief Add a toolbox widget to the gui with the given name
*
* This signal adds a toolbox widget to the toolbox area on the right.
* Hint: Ownership of the widget is expected to be transferred with this signal.
* Do not delete the widget in your plugins destructor.
*
* @param _name Visible name of the toolbox
* @param _widget Pointer to the toolbox widget
...
...
@@ -105,6 +107,8 @@ class ToolboxInterface {
/** \brief Add a toolbox widget to the gui with the given name and an icon
*
* This signal adds a toolbox widget to the toolbox area on the right. And sets an icon for it
* Hint: Ownership of the widget is expected to be transferred with this signal.
* Do not delete the widget in your plugins destructor.
*
* @param _name Visible name of the toolbox
* @param _widget Pointer to the toolbox widget
...
...
@@ -115,6 +119,8 @@ class ToolboxInterface {
/** \brief Add a toolbox widget to the gui with the given name, icon and header area widget.
*
* This signal adds a toolbox widget to the toolbox area on the right. And sets an icon for it
* Hint: Ownership of the widget is expected to be transferred with this signal.
* Do not delete the widget in your plugins destructor.
*
* @param _name Visible name of the toolbox
* @param _widget Pointer to the toolbox widget
...
...
Core/Core.cc
View file @
445feac4
...
...
@@ -1159,6 +1159,10 @@ void Core::slotExit() {
// Write all information on application exit
writeOnExit
();
// Call clearAll() before closing application
// in order to call all object's destructors...
clearAll
();
// Notify plugins of imminent exit.
for
(
uint
i
=
0
;
i
<
plugins_
.
size
()
;
++
i
){
BaseInterface
*
basePlugin
=
qobject_cast
<
BaseInterface
*
>
(
plugins_
[
i
].
plugin
);
...
...
@@ -1168,9 +1172,9 @@ void Core::slotExit() {
basePlugin
->
exit
();
}
//
Call clearAll() before closing application
// in order to call all object's destructors...
clearAll
()
;
//
Delete Plugins to actually call their destructor
for
(
PluginInfo
p
:
plugins_
)
delete
p
.
plugin
;
// close the log file to ensure everything is writeen correctly
if
(
logFile_
)
...
...
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