[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/korganizer
From:       Till Adam <adam () kde ! org>
Date:       2005-05-01 12:14:32
Message-ID: 20050501121432.C6CF1669 () office ! kde ! org
[Download RAW message or body]

CVS commit by tilladam: 

Better fix for the invalid recurrence problem.


  M +11 -2     koeditorrecurrence.cpp   1.85


--- kdepim/korganizer/koeditorrecurrence.cpp  #1.84:1.85
@@ -1339,5 +1339,4 @@ void KOEditorRecurrence::writeIncidence(
   // clear out any old settings;
   r->unsetRecurs();
-  bool invalidRecurrence = false;
 
   int duration = mRecurrenceRange->duration();
@@ -1441,5 +1440,15 @@ bool KOEditorRecurrence::validateInput()
     return false;
   }
-
+  int recurrenceType = mRecurrenceChooser->type();
+  // Check if a weekly recurrence has at least one day selected
+  if( mEnabledCheck->isChecked() && recurrenceType == RecurrenceChooser::Weekly ) {
+    const QBitArray &days = mWeekly->days();
+    bool valid = false;
+    for ( int i=0; i<7; ++i ) valid = valid || days.testBit( i );
+    if ( !valid ) {
+      // FIXME message box
+      return false;
+    }
+  }
   return true;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic