summaryrefslogtreecommitdiffabout
path: root/libkcal/incidencebase.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/incidencebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidencebase.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index f1db8b7..5d8785b 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -17,73 +17,71 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
#include "calformat.h"
#include "incidencebase.h"
using namespace KCal;
IncidenceBase::IncidenceBase() :
mReadOnly(false), mFloats(true), mDuration(0), mHasDuration(false),
mPilotId(0), mSyncStatus(SYNCMOD)
{
setUid(CalFormat::createUniqueId());
mOrganizer = "";
mFloats = false;
mDuration = 0;
mHasDuration = false;
mPilotId = 0;
- mZaurusId = -1;
mZaurusUid = 0;
mExternalId = ":";
mTempSyncStat = 0;
mSyncStatus = 0;
mAttendees.setAutoDelete( true );
}
IncidenceBase::IncidenceBase(const IncidenceBase &i) :
CustomProperties( i )
{
mReadOnly = i.mReadOnly;
mDtStart = i.mDtStart;
mDuration = i.mDuration;
mHasDuration = i.mHasDuration;
mOrganizer = i.mOrganizer;
mUid = i.mUid;
QPtrList<Attendee> attendees = i.attendees();
for( Attendee *a = attendees.first(); a; a = attendees.next() ) {
mAttendees.append( new Attendee( *a ) );
}
mFloats = i.mFloats;
mLastModified = i.mLastModified;
mPilotId = i.mPilotId;
- mZaurusId = i.mZaurusId;
mZaurusUid = i.mZaurusUid;
mTempSyncStat = i.mTempSyncStat;
mSyncStatus = i.mSyncStatus;
mExternalId = i.mExternalId;
// The copied object is a new one, so it isn't observed by the observer
// of the original object.
mObservers.clear();
mAttendees.setAutoDelete( true );
}
IncidenceBase::~IncidenceBase()
{
}
bool KCal::operator==( const IncidenceBase& i1, const IncidenceBase& i2 )
{
// do not compare mSyncStatus and mExternalId
if( i1.attendees().count() != i2.attendees().count() ) {
return false; // no need to check further
}
if ( i1.attendees().count() > 0 ) {
Attendee * a1 = i1.attendees().first(), *a2 =i2.attendees().first() ;
@@ -321,58 +319,48 @@ bool IncidenceBase::hasDuration() const
return mHasDuration;
}
void IncidenceBase::setSyncStatus(int stat)
{
if (mReadOnly) return;
mSyncStatus = stat;
}
int IncidenceBase::syncStatus() const
{
return mSyncStatus;
}
void IncidenceBase::setPilotId( int id )
{
if (mReadOnly) return;
mPilotId = id;
}
int IncidenceBase::pilotId() const
{
return mPilotId;
}
-void IncidenceBase::setZaurusId( int id )
-{
- if (mReadOnly) return;
- mZaurusId = id;
-}
-
-int IncidenceBase::zaurusId() const
-{
- return mZaurusId;
-}
int IncidenceBase::zaurusUid() const
{
return mZaurusUid;
}
void IncidenceBase::setZaurusUid( int id )
{
if (mReadOnly) return;
mZaurusUid = id;
}
int IncidenceBase::tempSyncStat() const
{
return mTempSyncStat;
}
void IncidenceBase::setTempSyncStat( int id )
{
if (mReadOnly) return;
mTempSyncStat = id;
}
void IncidenceBase::setID( const QString & prof , int id )
{
int num = mExternalId.find( ":"+prof+";" );