summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimevent.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimevent.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimevent.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp
index 9d46651..8752fce 100644
--- a/libopie2/opiepim/core/opimevent.cpp
+++ b/libopie2/opiepim/core/opimevent.cpp
@@ -24,24 +24,26 @@
24 -- :-=` this library; see the file COPYING.LIB. 24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30#include "opimevent.h" 30#include "opimevent.h"
31 31
32/* OPIE */ 32/* OPIE */
33#include <opie2/opimrecurrence.h> 33#include <opie2/opimrecurrence.h>
34#include <opie2/opimresolver.h> 34#include <opie2/opimresolver.h>
35#include <opie2/opimnotifymanager.h> 35#include <opie2/opimnotifymanager.h>
36#include <opie2/odebug.h>
37
36#include <qpe/categories.h> 38#include <qpe/categories.h>
37#include <qpe/stringutil.h> 39#include <qpe/stringutil.h>
38 40
39/* QT */ 41/* QT */
40 42
41namespace Opie 43namespace Opie
42{ 44{
43 45
44int OCalendarHelper::week( const QDate& date ) 46int OCalendarHelper::week( const QDate& date )
45{ 47{
46 // Calculates the week this date is in within that 48 // Calculates the week this date is in within that
47 // month. Equals the "row" is is in in the month view 49 // month. Equals the "row" is is in in the month view
@@ -632,28 +634,28 @@ void OPimEvent::fromMap( const QMap<int, QString>& map )
632 634
633 /* AllDay is always in UTC */ 635 /* AllDay is always in UTC */
634 if ( isAllDay() ) 636 if ( isAllDay() )
635 { 637 {
636 OPimTimeZone utc = OPimTimeZone::utc(); 638 OPimTimeZone utc = OPimTimeZone::utc();
637 setStartDateTime( utc.fromUTCDateTime( start ) ); 639 setStartDateTime( utc.fromUTCDateTime( start ) );
638 setEndDateTime ( utc.fromUTCDateTime( end ) ); 640 setEndDateTime ( utc.fromUTCDateTime( end ) );
639 setTimeZone( "UTC" ); // make sure it is really utc 641 setTimeZone( "UTC" ); // make sure it is really utc
640 } 642 }
641 else 643 else
642 { 644 {
643 /* to current date time */ 645 /* to current date time */
644 // qWarning(" Start is %d", start ); 646 // owarn << " Start is " << start << "" << oendl;
645 OPimTimeZone zone( timeZone().isEmpty() ? OPimTimeZone::current() : timeZone() ); 647 OPimTimeZone zone( timeZone().isEmpty() ? OPimTimeZone::current() : timeZone() );
646 QDateTime date = zone.toDateTime( start ); 648 QDateTime date = zone.toDateTime( start );
647 qWarning( " Start is %s", date.toString().latin1() ); 649 owarn << " Start is " << date.toString() << "" << oendl;
648 setStartDateTime( zone.toDateTime( date, OPimTimeZone::current() ) ); 650 setStartDateTime( zone.toDateTime( date, OPimTimeZone::current() ) );
649 651
650 date = zone.toDateTime( end ); 652 date = zone.toDateTime( end );
651 setEndDateTime ( zone.toDateTime( date, OPimTimeZone::current() ) ); 653 setEndDateTime ( zone.toDateTime( date, OPimTimeZone::current() ) );
652 } 654 }
653 655
654 int alarmTime = -1; 656 int alarmTime = -1;
655 if ( !map[ OPimEvent::FAlarm ].isEmpty() ) 657 if ( !map[ OPimEvent::FAlarm ].isEmpty() )
656 alarmTime = map[ OPimEvent::FAlarm ].toInt(); 658 alarmTime = map[ OPimEvent::FAlarm ].toInt();
657 659
658 int sound = ( ( map[ OPimEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent ); 660 int sound = ( ( map[ OPimEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent );
659 if ( ( alarmTime != -1 ) ) 661 if ( ( alarmTime != -1 ) )