summaryrefslogtreecommitdiff
authoreilers <eilers>2003-03-24 17:24:44 (UTC)
committer eilers <eilers>2003-03-24 17:24:44 (UTC)
commit84372ba20c0b1b09c1606212ec66c9d04588b90e (patch) (side-by-side diff)
tree36c4d861596c80b537c765af3f0c16495a763cc6
parent38d8d91e11c191f89429f4a3da8c1ada84b2a885 (diff)
downloadopie-84372ba20c0b1b09c1606212ec66c9d04588b90e.zip
opie-84372ba20c0b1b09c1606212ec66c9d04588b90e.tar.gz
opie-84372ba20c0b1b09c1606212ec66c9d04588b90e.tar.bz2
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"
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/datebookdb.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/datebookdb.cpp b/library/datebookdb.cpp
index a26fe8f..0fedfa8 100644
--- a/library/datebookdb.cpp
+++ b/library/datebookdb.cpp
@@ -838,13 +838,18 @@ void DateBookDB::loadFile( const QString &strFile )
else if ( value == "Yearly" )
rp.type = Event::Yearly;
else
rp.type = Event::NoRepeat;
break;
case FRWeekdays:
+ // 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();
break;
case FRFreq:
rp.frequency = value.toInt();