[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: proko2: kdepim/kresources/kolab
From: Bo Thorsen <bo () sonofthor ! dk>
Date: 2004-08-17 9:17:13
Message-ID: 20040817091713.55BC71EB9 () office ! kde ! org
[Download RAW message or body]
CVS commit by thorsen:
Implement a producer-id tag
M +6 -0 kabc/contact.cpp 1.1.2.28
M +2 -0 kabc/contact.h 1.1.2.20
M +9 -3 kcal/incidence.cpp 1.1.2.10
M +2 -0 kcal/incidence.h 1.1.2.6
M +6 -0 kcal/journal.cpp 1.1.2.6
M +2 -0 kcal/journal.h 1.1.2.4
M +6 -0 knotes/note.cpp 1.1.2.9
M +2 -0 knotes/note.h 1.1.2.6
M +1 -0 shared/kolabbase.cpp 1.1.2.17
M +3 -0 shared/kolabbase.h 1.1.2.10
--- kdepim/kresources/kolab/kabc/contact.cpp #1.1.2.27:1.1.2.28
@@ -1103,2 +1103,8 @@ QByteArray Kolab::Contact::loadSoundFrom
return data;
}
+
+QString Kolab::Contact::producerID() const
+{
+ // TODO: When KAB has the version number in a header file, don't hardcode
+ return "KAddressBook 3.3, Kolab resource";
+}
--- kdepim/kresources/kolab/kabc/contact.h #1.1.2.19:1.1.2.20
@@ -218,4 +218,6 @@ private:
QByteArray loadSoundFromAddressee( const KABC::Sound& sound );
+ QString producerID() const;
+
QString mGivenName;
QString mMiddleNames;
--- kdepim/kresources/kolab/kcal/incidence.cpp #1.1.2.9:1.1.2.10
@@ -36,4 +36,5 @@
#include <libkcal/journal.h>
#include <libkdepim/email.h>
+#include <korganizer/version.h>
#include <kdebug.h>
@@ -307,11 +308,11 @@ bool Incidence::saveAttributes( QDomElem
KolabBase::saveAttributes( element );
- writeString( element, "summary", summary() );
- writeString( element, "location", location() );
- saveEmailAttribute( element, organizer(), "organizer" );
if ( mFloatingStatus == HasTime )
writeString( element, "start-date", dateTimeToString( startDate() ) );
else
writeString( element, "start-date", dateToString( startDate().date() ) );
+ writeString( element, "summary", summary() );
+ writeString( element, "location", location() );
+ saveEmailAttribute( element, organizer(), "organizer" );
if ( !mRecurrence.cycle.isEmpty() )
saveRecurrence( element );
@@ -623,4 +624,9 @@ void Incidence::saveTo( KCal::Incidence*
}
+QString Incidence::producerID() const
+{
+ return QString( "KOrganizer " ) + korgVersion + ", Kolab resource";
+}
+
// Unhandled KCal::Incidence fields:
// revision, status (unused), priority (done in tasks), attendee.uid,
--- kdepim/kresources/kolab/kcal/incidence.h #1.1.2.5:1.1.2.6
@@ -123,4 +123,6 @@ protected:
void saveRecurrence( QDomElement& element ) const;
+ QString producerID() const;
+
QString mSummary;
QString mLocation;
--- kdepim/kresources/kolab/kcal/journal.cpp #1.1.2.5:1.1.2.6
@@ -35,4 +35,5 @@
#include <libkcal/journal.h>
+#include <korganizer/version.h>
#include <kdebug.h>
@@ -176,2 +177,7 @@ void Journal::setFields( const KCal::Jou
setStartDate( localToUTC( journal->dtStart() ) );
}
+
+QString Journal::producerID() const
+{
+ return QString( "KOrganizer " ) + korgVersion + ", Kolab resource";
+}
--- kdepim/kresources/kolab/kcal/journal.h #1.1.2.3:1.1.2.4
@@ -92,4 +92,6 @@ protected:
void setFields( const KCal::Journal* );
+ QString producerID() const;
+
QString mSummary;
QDateTime mStartDate;
--- kdepim/kresources/kolab/knotes/note.cpp #1.1.2.8:1.1.2.9
@@ -35,4 +35,5 @@
#include <libkcal/journal.h>
+#include <knotes/version.h>
#include <kdebug.h>
@@ -181,2 +182,7 @@ void Note::saveTo( KCal::Journal* journa
journal->setSummary( summary() );
}
+
+QString Note::producerID() const
+{
+ return QString( "KNotes %s, Kolab resource" ).arg( "KNOTES_VERSION" );
+}
--- kdepim/kresources/kolab/knotes/note.h #1.1.2.5:1.1.2.6
@@ -96,4 +96,6 @@ protected:
void saveTo( KCal::Incidence* ) const;
+ QString producerID() const;
+
QString mSummary;
QColor mBackgroundColor;
--- kdepim/kresources/kolab/shared/kolabbase.cpp #1.1.2.16:1.1.2.17
@@ -273,4 +273,5 @@ bool KolabBase::loadAttribute( QDomEleme
bool KolabBase::saveAttributes( QDomElement& element ) const
{
+ writeString( element, "producer-id", producerID() );
writeString( element, "uid", uid() );
writeString( element, "body", body() );
--- kdepim/kresources/kolab/shared/kolabbase.h #1.1.2.9:1.1.2.10
@@ -142,4 +142,7 @@ protected:
virtual bool saveAttributes( QDomElement& ) const;
+ // Return the producer ID
+ virtual QString producerID() const = 0;
+
// Write a string tag
static void writeString( QDomElement&, const QString&, const QString& );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic