summaryrefslogtreecommitdiffabout
path: root/libkcal/icalformat.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/icalformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/icalformat.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index f2e7dfc..3a2aac6 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -45,19 +45,18 @@ extern "C" {
#include "icalformat.h"
#include "icalformatimpl.h"
#define _ICAL_VERSION "2.0"
using namespace KCal;
-ICalFormat::ICalFormat(bool quick )
+ICalFormat::ICalFormat( )
{
- mQuicksave = false; //quick;
mImpl = new ICalFormatImpl( this );
tzOffsetMin = 0;
//qDebug("new ICalFormat() ");
}
ICalFormat::~ICalFormat()
{
delete mImpl;
@@ -71,26 +70,17 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName)
QFile file( fileName );
if (!file.open( IO_ReadOnly ) ) {
setException(new ErrorFormat(ErrorFormat::LoadError));
return false;
}
QTextStream ts( &file );
QString text;
-#if 0
- if ( !mQuicksave ) {
- qDebug("KO: No quickload!");
- ts.setEncoding( QTextStream::Latin1 );
- text = ts.read();
- } else {
- ts.setCodec( QTextCodec::codecForName("utf8") );
- text = ts.read();
- }
-#endif
+
ts.setEncoding( QTextStream::Latin1 );
text = ts.read();
file.close();
return fromString( calendar, text );
}
//#include <qdatetime.h>
@@ -109,26 +99,16 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName )
QFile file( fileName );
if (!file.open( IO_WriteOnly ) ) {
setException(new ErrorFormat(ErrorFormat::SaveError,
i18n("Could not open file '%1'").arg(fileName)));
return false;
}
QTextStream ts( &file );
-// #ifdef DESKTOP_VERSION
-// mQuicksave = false;
-// #endif
-// if ( mQuicksave ) {
-// ts << text.utf8();
-// } else {
-// ts.setEncoding( QTextStream::Latin1 );
-// ts << text;
-// //ts << text.latin1();
-// }
ts.setEncoding( QTextStream::Latin1 );
ts << text;
file.close();
//qDebug("saving file takes ms: %d ", is.elapsed() );
return true;
}
bool ICalFormat::fromString( Calendar *cal, const QString &text )