summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2016-07-31 14:20:34 +0200
committerDavid Faure <[email protected]>2016-07-31 14:24:42 +0200
commit53dd252a8b04d7712614e982b5628add16600267 (patch)
tree0b6b7288e0aaf4297836e30e7d57309c662cdf97
parent90f826edd31856c1505ac54ffb74263dbef15e96 (diff)
messageviewerplugins: don't create widget just to hide it
Called by ViewerPluginToolManager::closeAllTools() in ViewerPrivate::resetStateForNewMessage().
-rw-r--r--plugins/messageviewerplugins/createeventplugin/viewerplugincreateeventinterface.cpp4
-rw-r--r--plugins/messageviewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp4
-rw-r--r--plugins/messageviewerplugins/createtodoplugin/viewerplugincreatetodointerface.cpp4
3 files changed, 9 insertions, 3 deletions
diff --git a/plugins/messageviewerplugins/createeventplugin/viewerplugincreateeventinterface.cpp b/plugins/messageviewerplugins/createeventplugin/viewerplugincreateeventinterface.cpp
index 9f253e4..b79ed4e 100644
--- a/plugins/messageviewerplugins/createeventplugin/viewerplugincreateeventinterface.cpp
+++ b/plugins/messageviewerplugins/createeventplugin/viewerplugincreateeventinterface.cpp
@@ -64,7 +64,9 @@ void ViewerPluginCreateEventInterface::setMessage(const KMime::Message::Ptr &val
void ViewerPluginCreateEventInterface::closePlugin()
{
- widget()->slotCloseWidget();
+ if (mEventEdit) {
+ mEventEdit->slotCloseWidget();
+ }
}
void ViewerPluginCreateEventInterface::showWidget()
diff --git a/plugins/messageviewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp b/plugins/messageviewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp
index f785475..6ddf587 100644
--- a/plugins/messageviewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp
+++ b/plugins/messageviewerplugins/createnoteplugin/viewerplugincreatenoteinterface.cpp
@@ -62,7 +62,9 @@ void ViewerPluginCreatenoteInterface::setMessage(const KMime::Message::Ptr &valu
void ViewerPluginCreatenoteInterface::closePlugin()
{
- widget()->slotCloseWidget();
+ if (mNoteEdit) {
+ mNoteEdit->slotCloseWidget();
+ }
}
Akonadi::Relation ViewerPluginCreatenoteInterface::relatedNoteRelation() const
diff --git a/plugins/messageviewerplugins/createtodoplugin/viewerplugincreatetodointerface.cpp b/plugins/messageviewerplugins/createtodoplugin/viewerplugincreatetodointerface.cpp
index fd41c3a..befdd0c 100644
--- a/plugins/messageviewerplugins/createtodoplugin/viewerplugincreatetodointerface.cpp
+++ b/plugins/messageviewerplugins/createtodoplugin/viewerplugincreatetodointerface.cpp
@@ -59,7 +59,9 @@ void ViewerPluginCreateTodoInterface::setMessage(const KMime::Message::Ptr &valu
void ViewerPluginCreateTodoInterface::closePlugin()
{
- widget()->slotCloseWidget();
+ if (mTodoEdit) {
+ mTodoEdit->slotCloseWidget();
+ }
}
void ViewerPluginCreateTodoInterface::showWidget()