[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/trinity/kdepim
From: Timothy Pearson <kb9vqf () pearsoncomputing ! net>
Date: 2010-08-24 21:12:09
Message-ID: 20100824211209.4D24DAC857 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1167544 by tpearson:
Moved the editor open variable out of kocore to remove accidental compilation \
circular dependency
M +1 -1 korganizer/Makefile.am
M +0 -12 korganizer/kocore.cpp
M +0 -3 korganizer/kocore.h
M +3 -3 korganizer/koeditorgeneral.cpp
M +1 -1 kresources/caldav/Makefile.am
M +0 -4 kresources/caldav/resource.cpp
M +15 -0 libkcal/resourcecached.cpp
M +3 -0 libkcal/resourcecached.h
--- branches/trinity/kdepim/korganizer/Makefile.am #1167543:1167544
@@ -14,7 +14,7 @@
bin_PROGRAMS = korganizer
-korganizer_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+korganizer_LDFLAGS = $(all_libraries) $(KDE_RPATH) -lkcal
korganizer_LDADD = libkorganizer.la
korganizer_SOURCES = main.cpp korganizer.cpp koapp.cpp
korganizer_COMPILE_FIRST = koprefs_base.h
--- branches/trinity/kdepim/korganizer/kocore.cpp #1167543:1167544
@@ -41,8 +41,6 @@
#include <tqwidget.h>
-static bool m_editoropen = false;
-
KOCore *KOCore::mSelf = 0;
KOCore *KOCore::self()
@@ -64,16 +62,6 @@
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;
--- branches/trinity/kdepim/korganizer/kocore.h #1167543:1167544
@@ -84,9 +84,6 @@
KPIM::IdentityManager* identityManager();
- bool editorWindowOpen();
- void setEditorWindowOpen(bool open);
-
protected:
KOCore();
--- branches/trinity/kdepim/korganizer/koeditorgeneral.cpp #1167543:1167544
@@ -54,13 +54,13 @@
#include <libkcal/todo.h>
#include <libkcal/event.h>
+#include <libkcal/resourcecached.h>
#include <libkdepim/kdateedit.h>
#include <libkdepim/categoryselectdialog.h>
#include "koprefs.h"
#include "koglobals.h"
-#include "kocore.h"
#include "koeditorgeneral.h"
#include "koeditoralarms.h"
@@ -71,13 +71,13 @@
KOEditorGeneral::KOEditorGeneral(TQObject* parent, const char* name) :
TQObject( parent, name ), mAttachments(0)
{
- KOCore::self()->setEditorWindowOpen(true);
+ ResourceCached::setEditorWindowOpen(true);
mAlarmList.setAutoDelete( true );
}
KOEditorGeneral::~KOEditorGeneral()
{
- KOCore::self()->setEditorWindowOpen(false);
+ ResourceCached::setEditorWindowOpen(false);
}
--- branches/trinity/kdepim/kresources/caldav/Makefile.am #1167543:1167544
@@ -15,7 +15,7 @@
libkcal_caldav_la_LIBADD = \
$(top_builddir)/libkcal/libkcal.la \
$(top_builddir)/libkdepim/libkdepim.la \
- -lcaldav -lkorganizer
+ -lcaldav
libkcal_caldav_la_COMPILE_FIRST = prefsskel.h
kde_module_LTLIBRARIES = kcal_caldav.la
--- branches/trinity/kdepim/kresources/caldav/resource.cpp #1167543:1167544
@@ -38,7 +38,6 @@
#include "resource.h"
#include "reader.h"
#include "writer.h"
-#include <korganizer/kocore.h>
/*=========================================================================
| NAMESPACE
@@ -144,9 +143,6 @@
bool ResourceCalDav::doLoad() {
bool syncCache = true;
- // Make sure no editor windows are open
- if (KOCore::self()->editorWindowOpen() == true) return true;
-
if ((mLoadingQueueReady == false) || (mLoadingQueue.isEmpty() == false) || \
(mLoader->running() == true) || (isSaving() == true)) {
return true; // Silently fail; the user has obviously not responded to a \
dialog and we don't need to pop up more of them! }
--- branches/trinity/kdepim/libkcal/resourcecached.cpp #1167543:1167544
@@ -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 @@
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();
--- branches/trinity/kdepim/libkcal/resourcecached.h #1167543:1167544
@@ -66,6 +66,9 @@
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic