From: Jeremy Paul Whiting Date: Sat, 11 Aug 2007 16:10:12 +0000 (+0000) Subject: kvtml 2 format is the default for writing now. old format can be written by passing... X-Git-Tag: v3.93.0~91 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=5fb42ea07ab6cec6a62008adc026924bc7ce22e2;p=libqmvoc.git kvtml 2 format is the default for writing now. old format can be written by passing kvtml1 as FileType to saveAs still. svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=698955 --- diff --git a/keduvocdocument/keduvocdocument.cpp b/keduvocdocument/keduvocdocument.cpp index c35078f..19683b8 100644 --- a/keduvocdocument/keduvocdocument.cpp +++ b/keduvocdocument/keduvocdocument.cpp @@ -335,10 +335,17 @@ bool KEduVocDocument::saveAs(const KUrl & url, FileType ft, const QString & gene switch (ft) { case kvtml: { - KEduVocKvtmlWriter kvtmlWriter(&f); + // write version 2 file + KEduVocKvtml2Writer kvtmlWriter(&f); saved = kvtmlWriter.writeDoc(this, generator); } break; + case kvtml1: { + // write old version 1 file + KEduVocKvtmlWriter kvtmlWriter(&f); + saved = kvtmlWriter.writeDoc(this, generator); + } + break; /** @todo include the csv write again, as soon as it's ported to the new classes case csv: { KEduVocCsvWriter csvWriter(&f); diff --git a/keduvocdocument/keduvocdocument.h b/keduvocdocument/keduvocdocument.h index 6cc338a..b162326 100644 --- a/keduvocdocument/keduvocdocument.h +++ b/keduvocdocument/keduvocdocument.h @@ -56,7 +56,8 @@ public: pauker, vokabeln, xdxf, - csv }; + csv, + kvtml1 }; /** * Constructor for a KdeEdu vocabulary document