author | eilers <eilers> | 2003-03-24 17:24:44 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-03-24 17:24:44 (UTC) |
commit | 84372ba20c0b1b09c1606212ec66c9d04588b90e (patch) (unidiff) | |
tree | 36c4d861596c80b537c765af3f0c16495a763cc6 | |
parent | 38d8d91e11c191f89429f4a3da8c1ada84b2a885 (diff) | |
download | opie-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"
-rw-r--r-- | library/datebookdb.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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 ) | |||
841 | rp.type = Event::NoRepeat; | 841 | rp.type = Event::NoRepeat; |
842 | break; | 842 | break; |
843 | case FRWeekdays: | 843 | case FRWeekdays: |
844 | rp.days = value.toInt(); | 844 | // QtopiaDesktop 1.6 sometimes creates 'rweekdays="0"' |
845 | // when it goes mad. This causes datebook to crash.. (se) | ||
846 | if ( value.toInt() != 0 ) | ||
847 | rp.days = value.toInt(); | ||
848 | else | ||
849 | rp.days = 1; | ||
845 | break; | 850 | break; |
846 | case FRPosition: | 851 | case FRPosition: |
847 | rp.position = value.toInt(); | 852 | rp.position = value.toInt(); |