summaryrefslogtreecommitdiffstats
path: root/korganizer
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-24 19:33:28 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-24 19:33:28 +0000
commitc437f19f371b5678e0772a5f922fc3587864ca4e (patch)
treeab33a9046cd22c2ee69172eac02aa63d2ab7a3a1 /korganizer
parent90fb05e4f85dccfda4a6fb0b970f6f5c9f4b67d1 (diff)
downloadtdepim-c437f19f371b5678e0772a5f922fc3587864ca4e.tar.gz
tdepim-c437f19f371b5678e0772a5f922fc3587864ca4e.zip
Fixed CalDAV crash when event editor left open during automatic reload
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1167492 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer')
-rw-r--r--korganizer/kocore.cpp12
-rw-r--r--korganizer/kocore.h3
-rw-r--r--korganizer/koeditorgeneral.cpp3
3 files changed, 18 insertions, 0 deletions
diff --git a/korganizer/kocore.cpp b/korganizer/kocore.cpp
index b9d404e70..d5ed4f39b 100644
--- a/korganizer/kocore.cpp
+++ b/korganizer/kocore.cpp
@@ -41,6 +41,8 @@
#include <tqwidget.h>
+static bool m_editoropen = false;
+
KOCore *KOCore::mSelf = 0;
KOCore *KOCore::self()
@@ -62,6 +64,16 @@ KOCore::~KOCore()
mSelf = 0;
}
+bool KOCore::editorWindowOpen()
+{
+ return m_editoropen;
+}
+
+void KOCore::setEditorWindowOpen(bool open)
+{
+ m_editoropen = open;
+}
+
KTrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
{
TQString constraint;
diff --git a/korganizer/kocore.h b/korganizer/kocore.h
index f28382635..1d6a4ebe6 100644
--- a/korganizer/kocore.h
+++ b/korganizer/kocore.h
@@ -84,6 +84,9 @@ class KDE_EXPORT KOCore
KPIM::IdentityManager* identityManager();
+ bool editorWindowOpen();
+ void setEditorWindowOpen(bool open);
+
protected:
KOCore();
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index adaea1252..26ec5a517 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -60,6 +60,7 @@
#include "koprefs.h"
#include "koglobals.h"
+#include "kocore.h"
#include "koeditorgeneral.h"
#include "koeditoralarms.h"
@@ -70,11 +71,13 @@
KOEditorGeneral::KOEditorGeneral(TQObject* parent, const char* name) :
TQObject( parent, name ), mAttachments(0)
{
+ KOCore::self()->setEditorWindowOpen(true);
mAlarmList.setAutoDelete( true );
}
KOEditorGeneral::~KOEditorGeneral()
{
+ KOCore::self()->setEditorWindowOpen(false);
}