From 84372ba20c0b1b09c1606212ec66c9d04588b90e Mon Sep 17 00:00:00 2001 From: eilers Date: Mon, 24 Mar 2003 17:24:44 +0000 Subject: Small anti-crash fix: Sync with QtopiaDesktop caused a big mess. But this mess should't crash datebook. Therefore this fix prevents datebook to hang if rweekdays=="0" --- (limited to 'library/datebookdb.cpp') diff --git a/library/datebookdb.cpp b/library/datebookdb.cpp index a26fe8f..0fedfa8 100644 --- a/library/datebookdb.cpp +++ b/library/datebookdb.cpp @@ -841,7 +841,12 @@ void DateBookDB::loadFile( const QString &strFile ) rp.type = Event::NoRepeat; break; case FRWeekdays: - rp.days = value.toInt(); + // QtopiaDesktop 1.6 sometimes creates 'rweekdays="0"' + // when it goes mad. This causes datebook to crash.. (se) + if ( value.toInt() != 0 ) + rp.days = value.toInt(); + else + rp.days = 1; break; case FRPosition: rp.position = value.toInt(); -- cgit v0.9.0.2