summaryrefslogtreecommitdiffstats
path: root/libkcal
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-24 21:12:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-24 21:12:08 +0000
commitf8fb0a6b61511cee7d2001dd781e0bfaf934b690 (patch)
tree336f1202ad019d437c19fd5c030e2fca97b16666 /libkcal
parentc437f19f371b5678e0772a5f922fc3587864ca4e (diff)
downloadtdepim-f8fb0a6b61511cee7d2001dd781e0bfaf934b690.tar.gz
tdepim-f8fb0a6b61511cee7d2001dd781e0bfaf934b690.zip
Moved the editor open variable out of kocore to remove accidental compilation circular dependency
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1167544 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal')
-rw-r--r--libkcal/resourcecached.cpp15
-rw-r--r--libkcal/resourcecached.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/libkcal/resourcecached.cpp b/libkcal/resourcecached.cpp
index 2fecbb50..3b654aef 100644
--- a/libkcal/resourcecached.cpp
+++ b/libkcal/resourcecached.cpp
@@ -46,6 +46,8 @@
using namespace KCal;
+static bool m_editoropen = false;
+
ResourceCached::ResourceCached( const KConfig* config )
: ResourceCalendar( config ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mReloadPolicy( ReloadNever ), mReloadInterval( 10 ),
@@ -584,10 +586,23 @@ void ResourceCached::disableChangeNotification()
mCalendar.unregisterObserver( this );
}
+bool ResourceCached::editorWindowOpen()
+{
+ return m_editoropen;
+}
+
+void ResourceCached::setEditorWindowOpen(bool open)
+{
+ m_editoropen = open;
+}
+
void ResourceCached::slotReload()
{
if ( !isActive() ) return;
+ // Make sure no editor windows are open
+ if (editorWindowOpen() == true) return;
+
kdDebug(5800) << "ResourceCached::slotReload()" << endl;
load();
diff --git a/libkcal/resourcecached.h b/libkcal/resourcecached.h
index efda5a23..42212272 100644
--- a/libkcal/resourcecached.h
+++ b/libkcal/resourcecached.h
@@ -66,6 +66,9 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
void readConfig( const KConfig *config );
void writeConfig( KConfig *config );
+ static bool editorWindowOpen();
+ static void setEditorWindowOpen(bool open);
+
/**
Set reload policy. This controls when the cache is refreshed.