summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.h4
-rw-r--r--libkcal/calendarlocal.cpp8
-rw-r--r--libkcal/calendarlocal.h4
-rw-r--r--libkcal/incidencebase.cpp12
-rw-r--r--libkcal/incidencebase.h3
-rw-r--r--libkcal/sharpformat.cpp18
6 files changed, 17 insertions, 32 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index df5bbcf..d59bca6 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -164,3 +164,3 @@ public:
virtual Event *event( const QString &UniqueStr ) = 0;
- virtual Event *event( int ) = 0;
+ virtual Event *event( QString, int ) = 0;
/**
@@ -213,3 +213,3 @@ public:
virtual Todo *todo( const QString &uid ) = 0;
- virtual Todo *todo( int ) = 0;
+ virtual Todo *todo( QString, int ) = 0;
/**
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 09ce9f0..e464a77 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -214,3 +214,3 @@ QPtrList<Todo> CalendarLocal::rawTodos()
}
-Todo *CalendarLocal::todo( int id )
+Todo *CalendarLocal::todo( QString syncProf, int id )
{
@@ -218,3 +218,3 @@ Todo *CalendarLocal::todo( int id )
for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
- if ( todo->zaurusId() == id ) return todo;
+ if ( todo->getID( syncProf ) == id ) return todo;
}
@@ -237,3 +237,3 @@ QPtrList<Event> CalendarLocal::getExternLastSyncEvents()
}
-Event *CalendarLocal::event( int id )
+Event *CalendarLocal::event( QString syncProf, int id )
{
@@ -241,3 +241,3 @@ Event *CalendarLocal::event( int id )
for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
- if ( todo->zaurusId() == id ) return todo;
+ if ( todo->getID( syncProf ) == id ) return todo;
}
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index 3257198..4728063 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -177,4 +177,4 @@ class CalendarLocal : public Calendar
bool inclusive = false );
- Todo *CalendarLocal::todo( int uid );
- Event *CalendarLocal::event( int uid );
+ Todo *todo( QString, int uid );
+ Event *event( QString,int uid );
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index f1db8b7..5d8785b 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -40,3 +40,2 @@ IncidenceBase::IncidenceBase() :
mPilotId = 0;
- mZaurusId = -1;
mZaurusUid = 0;
@@ -64,3 +63,2 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) :
mPilotId = i.mPilotId;
- mZaurusId = i.mZaurusId;
mZaurusUid = i.mZaurusUid;
@@ -344,12 +342,2 @@ int IncidenceBase::pilotId() const
}
-void IncidenceBase::setZaurusId( int id )
-{
- if (mReadOnly) return;
- mZaurusId = id;
-}
-
-int IncidenceBase::zaurusId() const
-{
- return mZaurusId;
-}
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index 2f85df6..e2950d3 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -128,4 +128,2 @@ class IncidenceBase : public CustomProperties
- void setZaurusId(int id);
- int zaurusId() const;
void setZaurusUid(int id);
@@ -163,3 +161,2 @@ class IncidenceBase : public CustomProperties
QString mExternalId;
- int mZaurusId;
int mZaurusUid;
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index d39d2dd..605a54d 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -87,3 +87,3 @@ class SharpParser : public QObject
Event *event;
- event = existingCalendar->event( attList[0].toInt() );
+ event = existingCalendar->event( "Sharp_DTM",attList[0].toInt() );
if ( event )
@@ -92,3 +92,3 @@ class SharpParser : public QObject
event = new Event;
- event->setZaurusId( attList[0].toInt() );
+ event->setID("Sharp_DTM", attList[0].toInt() );
event->setZaurusUid( cSum );
@@ -191,3 +191,3 @@ class SharpParser : public QObject
- todo = existingCalendar->todo( attList[0].toInt() );
+ todo = existingCalendar->todo( "Sharp_DTM", attList[0].toInt() );
if (todo )
@@ -203,3 +203,3 @@ class SharpParser : public QObject
- todo->setZaurusId( attList[0].toInt() );
+ todo->setID( "Sharp_DTM", attList[0].toInt() );
todo->setZaurusUid( cSum );
@@ -468,3 +468,3 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
retval = newnum;
- inc->setZaurusId( newnum );
+ inc->setID( "Sharp_DTM",newnum );
inc->setZaurusUid( getCsum( templist ) );
@@ -522,3 +522,3 @@ bool SharpFormat::save( Calendar *calendar)
}
- else if ( ev->zaurusId() == -1 ) { // add new
+ else if ( ev->getID("Sharp_DTM") == -1 ) { // add new
command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName;
@@ -608,3 +608,3 @@ bool SharpFormat::save( Calendar *calendar)
}
- else if ( to->zaurusId() == -1 ) { // add new
+ else if ( to->getID("Sharp_DTM") == -1 ) { // add new
command = "(echo \"" + tPrefix + eString + "\" ) | db2file todo -w -g -c " + codec+ " > "+ fileName;
@@ -698,3 +698,3 @@ QString SharpFormat::getEventString( Event* event )
QStringList list;
- list.append( QString::number(event->zaurusId() ) );
+ list.append( QString::number(event->getID("Sharp_DTM") ) );
list.append( event->categories().join(",") );
@@ -862,3 +862,3 @@ QString SharpFormat::getTodoString( Todo* todo )
QStringList list;
- list.append( QString::number( todo->zaurusId() ) );
+ list.append( QString::number( todo->getID("Sharp_DTM") ) );
list.append( todo->categories().join(",") );