summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2004-10-13 00:09:20 (UTC)
committer zautrix <zautrix>2004-10-13 00:09:20 (UTC)
commitd56ca1073ce493afdeb54e33425638f7147d4bca (patch) (side-by-side diff)
tree03b21c9d7a875c7f7dd46d936d834570d211ae42 /libkcal
parent0dab27179ee6b1e0a052ab589a27e31ffb887912 (diff)
downloadkdepimpi-d56ca1073ce493afdeb54e33425638f7147d4bca.zip
kdepimpi-d56ca1073ce493afdeb54e33425638f7147d4bca.tar.gz
kdepimpi-d56ca1073ce493afdeb54e33425638f7147d4bca.tar.bz2
fix in save vcal as local time
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/vcalformat.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 309c699..a6ae1bc 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -59,15 +59,13 @@ void VCalFormat::setLocalTime ( bool b )
useLocalTime = b;
}
bool VCalFormat::load(Calendar *calendar, const QString &fileName)
{
mCalendar = calendar;
clearException();
-
- kdDebug(5800) << "VCalFormat::load() " << fileName << endl;
-
+ useLocalTime = mCalendar->isLocalTime();
VObject *vcal = 0;
// this is not necessarily only 1 vcal. Could be many vcals, or include
// a vcard...
vcal = Parse_MIME_FromFileName(const_cast<char *>(QFile::encodeName(fileName).data()));
@@ -89,17 +87,17 @@ bool VCalFormat::load(Calendar *calendar, const QString &fileName)
}
bool VCalFormat::save(Calendar *calendar, const QString &fileName)
{
mCalendar = calendar;
+ useLocalTime = mCalendar->isLocalTime();
QString tmpStr;
VObject *vcal, *vo;
- kdDebug(5800) << "VCalFormat::save(): " << fileName << endl;
vcal = newVObject(VCCalProp);
// addPropValue(vcal,VCLocationProp, "0.0");
addPropValue(vcal,VCProdIdProp, productId());
tmpStr = mCalendar->getTimeZoneStr();
@@ -125,16 +123,14 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName)
writeVObjectToFile(QFile::encodeName(fileName).data() ,vcal);
cleanVObjects(vcal);
cleanStrTbl();
if (QFile::exists(fileName)) {
- kdDebug(5800) << "No error" << endl;
return true;
} else {
- kdDebug(5800) << "Error" << endl;
return false; // error
}
}
bool VCalFormat::fromString( Calendar *calendar, const QString &text )
{
@@ -158,13 +154,13 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text )
strcmp( vObjectName( curvo ), VCTodoProp ) );
if ( strcmp( vObjectName( curvo ), VCEventProp ) == 0 ) {
Event *event = VEventToEvent( curvo );
calendar->addEvent( event );
} else {
- kdDebug(5800) << "VCalFormat::fromString(): Unknown object type." << endl;
+ qDebug("VCalFormat::fromString(): Unknown object type. ");
deleteVObject( vcal );
return false;
}
deleteVObject( vcal );