Re: [PATCH] fix bad XML output when using todo recurrence
Dmitriy Korovkin <[email protected]> Wed, 03 Jan 2007 14:49:05 +0300
| Newsgroups | gmane.comp.handhelds.opie.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear Colleagues,
Will someone from "core team" review this patch?
Thanks in advance,
Dmitriy
Paul Eggleton wrote:
> Hi all,
>
> The attached patch fixes invalid XML being stored for todo items when
> recurrence is enabled (see bug #1753 -
> http://opie-bugs.oszine.de/view.php?id=1753).
>
> Cheers,
> Paul
>
> ------------------------------------------------------------------------
>
> Index: otodoaccessxml.cpp
> ===================================================================
> RCS file: /cvs/opie/libopie2/opiepim/backend/otodoaccessxml.cpp,v
> retrieving revision 1.33
> diff -d -u -r1.33 otodoaccessxml.cpp
> --- otodoaccessxml.cpp 28 Dec 2004 14:19:26 -0000 1.33
> +++ otodoaccessxml.cpp 28 Dec 2006 11:18:35 -0000
> @@ -543,21 +543,21 @@
> QString OPimTodoAccessXML::toString( const OPimTodo& ev )const {
> QString str;
>
> - str += "Completed=\"" + QString::number( ev.isCompleted() ) + "\" ";
> - str += "HasDate=\"" + QString::number( ev.hasDueDate() ) + "\" ";
> - str += "Priority=\"" + QString::number( ev.priority() ) + "\" ";
> - str += "Progress=\"" + QString::number(ev.progress() ) + "\" ";
> + str += "Completed=\"" + QString::number( ev.isCompleted() ) + "\"";
> + str += " HasDate=\"" + QString::number( ev.hasDueDate() ) + "\"";
> + str += " Priority=\"" + QString::number( ev.priority() ) + "\"";
> + str += " Progress=\"" + QString::number(ev.progress() ) + "\"";
>
> - str += "Categories=\"" + toString( ev.categories() ) + "\" ";
> - str += "Description=\"" + Qtopia::escapeString( ev.description() ) + "\" ";
> - str += "Summary=\"" + Qtopia::escapeString( ev.summary() ) + "\" ";
> + str += " Categories=\"" + toString( ev.categories() ) + "\"";
> + str += " Description=\"" + Qtopia::escapeString( ev.description() ) + "\"";
> + str += " Summary=\"" + Qtopia::escapeString( ev.summary() ) + "\"";
>
> if ( ev.hasDueDate() ) {
> - str += "DateYear=\"" + QString::number( ev.dueDate().year() ) + "\" ";
> - str += "DateMonth=\"" + QString::number( ev.dueDate().month() ) + "\" ";
> - str += "DateDay=\"" + QString::number( ev.dueDate().day() ) + "\" ";
> + str += " DateYear=\"" + QString::number( ev.dueDate().year() ) + "\"";
> + str += " DateMonth=\"" + QString::number( ev.dueDate().month() ) + "\"";
> + str += " DateDay=\"" + QString::number( ev.dueDate().day() ) + "\"";
> }
> - str += "Uid=\"" + QString::number( ev.uid() ) + "\" ";
> + str += " Uid=\"" + QString::number( ev.uid() ) + "\"";
>
> // append the extra options
> /* FIXME Qtopia::Record this is currently not
> @@ -570,18 +570,18 @@
> QMap<QString, QString> extras = ev.extras();
> QMap<QString, QString>::Iterator extIt;
> for (extIt = extras.begin(); extIt != extras.end(); ++extIt )
> - str += extIt.key() + "=\"" + extIt.data() + "\" ";
> + str += " " + extIt.key() + "=\"" + extIt.data() + "\"";
> */
> // cross refernce
> if ( ev.hasRecurrence() ) {
> str += ev.recurrence().toString();
> }
> if ( ev.hasStartDate() )
> - str += "StartDate=\""+ OPimDateConversion::dateToString( ev.startDate() ) +"\" ";
> + str += " StartDate=\""+ OPimDateConversion::dateToString( ev.startDate() ) +"\"";
> if ( ev.hasCompletedDate() )
> - str += "CompletedDate=\""+ OPimDateConversion::dateToString( ev.completedDate() ) +"\" ";
> + str += " CompletedDate=\""+ OPimDateConversion::dateToString( ev.completedDate() ) +"\"";
> if ( ev.hasState() )
> - str += "State=\""+QString::number( ev.state().state() )+"\" ";
> + str += " State=\""+QString::number( ev.state().state() )+"\"";
>
> /*
> * save reminders and notifiers!
> @@ -603,7 +603,7 @@
> }
> }
> // now write the list
> - str += "Alarms=\""+als.join(";") +"\" ";
> + str += " Alarms=\""+als.join(";") +"\"";
> }
>
> /*
> @@ -616,12 +616,11 @@
> for ( ; it != reminders.end(); ++it ) {
> records << QString::number( (*it).recordUid() );
> }
> - str += "Reminders=\""+ records.join(";") +"\" ";
> + str += " Reminders=\""+ records.join(";") +"\"";
> }
> }
> str += customToXml( ev.toExtraMap() );
>
> -
> return str;
> }
> QString OPimTodoAccessXML::toString( const QArray<int>& ints ) const {
>
> ------------------------------------------------------------------------
>
> _______________________________________________
>
> http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex
>
> Opie-devel mailing list
> [email protected]
> https://handhelds.org/mailman/listinfo/opie-devel
>
_______________________________________________
http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex
Opie-devel mailing list
[email protected]
https://handhelds.org/mailman/listinfo/opie-devel